SetWindowPos函数用法,::SetWindowPos(GetSafeHwnd(),HWND_TOPMOST,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE);
void CMyApp::OnHideApplication()
{
//m_pMainWnd is the main application window, a member of CMyApp
ASSERT_VALID(m_pMainWnd); // hide the application's windows before closing all the documents
m_pMainWnd->ShowWindow(SW_HIDE);
m_pMainWnd->ShowOwnedPopups(FALSE); // put the window at the bottom of z-order, so it isn't activated
m_pMainWnd->SetWindowPos(&CWnd::wndBottom, 0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
}
void CMyApp::OnHideApplication()
{
//m_pMainWnd is the main application window, a member of CMyApp
ASSERT_VALID(m_pMainWnd); // hide the application's windows before closing all the documents
m_pMainWnd->ShowWindow(SW_HIDE);
m_pMainWnd->ShowOwnedPopups(FALSE); // put the window at the bottom of z-order, so it isn't activated
m_pMainWnd->SetWindowPos(&CWnd::wndBottom, 0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE);
}
解决方案 »
- SHBrowseForFolder问题
- 有没有人有块匹配代码,最好是研究过电子稳像的
- 怎么让滚动条滚动到最后,我实现一个类似CMD命令的功能的窗口
- 实在是奇怪.真的是百思不得其解...................................................
- 请大家看看这段代码,我想数据存入数组,但实现不了,帮帮忙吧
- 关于_RecordsetPtr adoEOF 问题! 请高手给个明确的答复。
- dll里对话框上的工具条没有tooltip功能
- 程序大小问题
- 请教在工程中重新实现new和delete问题
- 请教一个简单的问题,关于对话框的编辑。
- c# socket获取html内容与httpWebRequest获取html内容不一致
- 本论坛的回贴通知的问题?
当然你也可以控制失焦点事件来达到效果
SetWindowPos 函数。。