'ESC 종료'에 해당되는 글 1건

  1. 2009.06.15 MFC 다이얼로그 ESC 종료 막기, CEdit 엔터 종료 막기
Programming/C Win32 MFC2009. 6. 15. 17:06

Ctrl-W 를 눌러,
클래스 위저드에서 다이얼로그 Object를 선택
Messages 에서 PreTranslateMessage를 선택하여
Add Function / Edit Code 를 한 뒤 아래의 코드를 넣어준다.


BOOL ClassName::PreTranslateMessage(MSG* pMsg)
{
     // TODO: Add your specialized code here and/or call the base class
     if(pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE)
          return TRUE;
          
     return CDialog::PreTranslateMessage(pMsg);
}

[링크 : http://lafirr.tistory.com/20]
Posted by 구차니