http://blog.naver.com/PostView.nhn?blogId=youkgc&logNo=150082929746
CPaneDialog 클래스에는 OnInitDialog 가상 함수가 없기 때문에 WM_INITDIALOG 메시지를 이용한다.
// 헤더
virtual BOOL OnInitDialog();
afx_msg LRESULT HandleInitDialog(WPARAM, LPARAM);
// 소스
BEGIN_MESSAGE_MAP(Class, CPaneDialog)
...
ON_MESSAGE(WM_INITDIALOG, HandleInitDialog)
END_MESSAGEMAP()
BOOL Class::OnInitDialog()
{
UpdateData(FALSE);
return TRUE;
}
LRESULT Class::HandleInitDialog(WPARAM wParam, LPARAM lParam)
{
OnInitDialog();
return CPaneDialog::HandleInitDialog(wParam, lParam);
}
virtual BOOL OnInitDialog();
afx_msg LRESULT HandleInitDialog(WPARAM, LPARAM);
// 소스
BEGIN_MESSAGE_MAP(Class, CPaneDialog)
...
ON_MESSAGE(WM_INITDIALOG, HandleInitDialog)
END_MESSAGEMAP()
BOOL Class::OnInitDialog()
{
UpdateData(FALSE);
return TRUE;
}
LRESULT Class::HandleInitDialog(WPARAM wParam, LPARAM lParam)
{
OnInitDialog();
return CPaneDialog::HandleInitDialog(wParam, lParam);
}