PreTranslateMessage 함수를 오버라이드해서 Contorl이 가능합니다
ECS 키 뿐만 아니라 다른 키도 제어 할수 있습니다
BOOL CUserDialog::PreTranslateMessage(MSG* pMsg)
{
if( pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE )// ESC 키를 누를 경우
{
return TRUE;
}
// 아니면 다음을 수행
return CDialog::PreTranslateMessage(pMsg);
}
[출처] MFC / Dialog 에서 ESC 키 안먹게 하기|작성자 탕구