본문 바로가기

About Programing/03. Tip

MFC Dialog 꽉찬 화면

BOOL PlayGameForm::OnInitDialog()
{
	CDialog::OnInitDialog();

	HWND m_hwnd = this->m_hWnd;

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

	return TRUE;
}