VC编程经验汇总2009-10-081. 显示和隐藏标题栏方法一:使用API实现//隐藏TitleBarLONG lStyle = ::GetWindowLong(this->m_hWnd, GWL_STYLE);::SetWindowLong(this->m_hWnd, GWL_STYLE, lStyle & ~WS_CAPTION);::SetWindowPos(this->m_hWnd, NULL, 0, 0, 0, 0,SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);// 显示TitleBar::SetWindowLong(this->m_hWnd, GWL_STYLE, lStyle | WS_CAPTION);::SetWindowPos(this->m_hWnd, NULL, 0, 0, 0, 0,??SWP_NOSIZE | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);方法二:使用CWnd成员函数ModifyStyle实现// 隐藏TitleBarModifyStyle(WS_CAPTION, 0, SWP_FRAMECHANGED);// 显示TitleBarModifyStyle(0, WS_CAPTION, SWP_FRAMECHANGED);2 . 怎么用SendMessage()来发送消息来清空它的内容??HWND hEditWnd=GetDlgItem(IDC_EDIT1)->GetSafeHwnd();::SendMessage(hEditWnd,WM_SETTEXT,(WPARAM)0,(LPARAM)"");3. 弹出文件的属性窗口SHELLEXECUTEINFO ShExecInfo ={0};ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);ShExecInfo.fMask = SEE_MASK_INVOKEIDLIST ;ShExecInfo.hwnd = NULL;ShExecInfo.lpVerb = "properties";ShExecInfo.lpFile = "c:"; //也可以是文件ShExecInfo.lpParameters = "";ShExecInfo.lpDirectory = NULL;ShExecInfo.nShow = SW_SHOW;ShExecInfo.hInstApp = NULL;ShellExecuteEx(&ShExecInfo);