본문 바로가기

MFC(Window Programming)

OnSize 함수 호출 방법 MFC

728x90

CRect rcWindowRef, rcWindowTarget;

 

CWnd* pWnd = ((CTistoryApp*)AfxGetApp())->FindMainView();

 

if (pWnd != NULL)
{

 pWnd->MoveWindow(&rcWindowRef);

 

 pWnd->SendMessage(

 WM_SIZE,

 (WPARAM)SIZE_RESTORED,

 MAKELPARAM(rcWindowRef.Width(), rcWindowRef.Height()));

}

728x90