MFC
클라이언트 영역 설정하여 윈도우 크기 조절하기
Geuny
2013. 3. 5. 09:35
Dialog based일 때, OnInitDialog() 내에 다음과 같이 작성한다.
RECT m_Rect = {0, 0, 1024, 768}; // 생성하고 싶은 사이즈를 RECT 변수에 초기화. 여기서는 1024x768로 설정하였다.
AdjustWindowRect(&m_Rect, WS_OVERLAPPEDWINDOW, FALSE);
int width = m_Rect.right - m_Rect.left;
int height = m_Rect.bottom - m_Rect.top;
this->SetWindowPos(NULL, 0, 0, width, height, 0);