C & C++/MFC 컨트롤
다이얼로그 최대화 하는 2가지 방법
izen8
2012. 11. 28. 17:22
방법 1) ShowWindow(SW_MAXIMIZE);
==============================================================================================
방법 2)
//OnInitDialog() 부분에 추가하면 된다.
LONG style = ::GetWindowLong( m_hWnd, GWL_STYLE );
style &= ~WS_CAPTION;
style &= ~WS_SYSMENU;
::SetWindowLong( m_hWnd, GWL_STYLE, style );
int screenx = GetSystemMetrics( SM_CXSCREEN );
int screeny = GetSystemMetrics( SM_CYSCREEN );
// resize:
SetWindowPos( NULL, -4, -4, screenx+8, screeny+4, SWP_NOZORDER );
LONG style = ::GetWindowLong( m_hWnd, GWL_STYLE );
style &= ~WS_CAPTION;
style &= ~WS_SYSMENU;
::SetWindowLong( m_hWnd, GWL_STYLE, style );
int screenx = GetSystemMetrics( SM_CXSCREEN );
int screeny = GetSystemMetrics( SM_CYSCREEN );
// resize:
SetWindowPos( NULL, -4, -4, screenx+8, screeny+4, SWP_NOZORDER );