调用函数:
BOOL SetWindowPos(
HWND hWnd, // handle to window
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning flags
);
例如:
void CSwitcherDlg::OnCheck1()
{
// TODO: Add your control notification handler code here
UpdateData(true);
if (m_check_1)
{
::SetWindowPos(this->m_hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); // top view
}
else
{
::SetWindowPos(this->m_hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); // normal view
}
}
文章评论(0条评论)
登录后参与讨论