CodeSarang.Com
Home | 전체 메뉴 | 질문/답변 Join | Login | 검색   

 

CDialog 에서 Enter 키 입력 막기 - OnOK()

등록자 : cpueblo (유광희), 2008-08-28

1. PreTranslateMessage 에 추가하기

BOOL CTestDlg::PreTranslateMessage(MSG* pMsg) 
{
	// TODO: Add your specialized code here and/or call the base class
	if(pMsg->message == WM_KEYDOWN && pMsg->wParam == 13)
		pMsg->wParam = 1;

	return CDialog::PreTranslateMessage(pMsg);
}

2.Dlg 헤더에서 아래처럼 virtual 선언

virtual void OnOK(){}


댓글 달기 (로그인이 필요합니다)
제목
내용

http://codesarang.com. mail to cpueblocpueblo.com