CodeSarang.Com
Home | All categories 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