16,472
社区成员
发帖
与我相关
我的任务
分享
void CXXXDlg::OnLButtonDblClk(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CDialog::OnLButtonDblClk(nFlags, point);
static BOOL bMaximum = FALSE;
bMaximum = !bMaximum;
if(bMaximum)
{
ModifyStyle(WS_CAPTION, 0, SWP_FRAMECHANGED);
ShowWindow(SW_SHOWMAXIMIZED);
}
else
{
ModifyStyle(0, WS_CAPTION, SWP_FRAMECHANGED);
ShowWindow(SW_RESTORE);
}
}
m_bFullScreen=!m_bFullScreen;
//全屏显示
LONG style = ::GetWindowLong(this->m_hWnd,GWL_STYLE);
if(m_bFullScreen)
{
style &= ~(WS_DLGFRAME | WS_THICKFRAME);
SetWindowLong(this->m_hWnd,GWL_STYLE, style);
this->ShowWindow(SW_SHOWMAXIMIZED);
CRect rect;
this->GetWindowRect(&rect);
::SetWindowPos(this->m_hWnd,HWND_NOTOPMOST,rect.left-1, rect.top-1, rect.right-rect.left + 3, rect.bottom-rect.top + 3, SWP_FRAMECHANGED);
}
else
{
style |= WS_DLGFRAME | WS_THICKFRAME;
SetWindowLong(this->m_hWnd, GWL_STYLE, style);
this->ShowWindow(SW_NORMAL);
}