공부/코드

[MFC] 다이얼로그를 전체화면으로 작성

광주아이 2008. 3. 31. 14:58
//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 );