반응형
/////// 전역변수 ///////
int _style;
CRect _originWindow;
////////////////////////
void CEx2Dlg::OnBnClickedButton1() // 전체화면
{
int windowWidth = GetSystemMetrics(SM_CXSCREEN);
int windowHeight = GetSystemMetrics(SM_CYSCREEN);
_style = ::GetWindowLong(this->m_hWnd, GWL_STYLE);
::GetWindowRect(this->m_hWnd, &_originWindow);
::SetWindowLong(this->m_hWnd, GWL_STYLE, NULL);
SetWindowPos(&wndTopMost, 0, 0, windowWidth, windowHeight, NULL);
ShowWindow( SW_MAXIMIZE );
}
void CEx2Dlg::OnBnClickedButton2() // 원래대로
{
::SetWindowLong(this->m_hWnd, GWL_STYLE, _style);
SetWindowPos(GetParent(), _originWindow.left, _originWindow.top,
_originWindow.right - _originWindow.left, _originWindow.bottom - _originWindow.top, NULL);
}
반응형
'Programming > MFC-C++' 카테고리의 다른 글
| Mp3 Player C++ 소스코드 (0) | 2013.05.21 |
|---|---|
| OpenGL 화살표 (1) | 2013.05.21 |
| 구조체 sizeof 의 오작동 (0) | 2013.04.26 |
| [C++, C] 파일의 중간 부분 데이터 변경하기 (0) | 2013.04.25 |
| MFC 폴더 선택 Dialog (0) | 2013.04.24 |