Application/MFC

[MFC] Escape(Esc) Or Enter 입력시 Form 닫히는 문제 해결법

devsalix 2014. 8. 13. 15:07
728x90

기존 Code


BOOL TestDlg::PreTranslateMessage(MSG* pMsg)
{
	return CDialog::PreTranslateMessage(pMsg);
} 

 

변경 Code


BOOL TestDlg::PreTranslateMessage(MSG* pMsg)
{
	return CWnd::PreTranslateMessage(pMsg);
} 

 

위와같이 [CDialog] -> [CWnd] 변경만으로 가능하다

728x90