mfc windows窗口全屏的方法

 LONG style = ::GetWindowLong(this->m_hWnd,GWL_STYLE);

  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);

 


你可能感兴趣的:(mfc windows窗口全屏的方法)