소프트웨어
다이얼로그 ESC, Enter 키 막기
프로채터
2010. 11. 12. 09:47
BOOL CXXXXXDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
if(pMsg->message == WM_KEYDOWN) // 키보드를 눌렀을 때의 처리
{
if(pMsg->wParam == VK_ESCAPE) // ESC키 처리
{
// Esc키 처리 확인
// AfxMessageBox("VK_ESCAPE", MB_OK|MB_ICONINFORMATION);
return TRUE;
}
else if(pMsg->wParam == VK_RETURN) // Enter키 처리
{
return TRUE;
}
}
return CDialog::PreTranslateMessage(pMsg);
}
[출처] 다이얼로그 박스에서 엔터키/ESC 종료 막기|작성자 tommy