When in my dialog the ENTER key is hit the dialog exits. How can i disable that.
Printable View
When in my dialog the ENTER key is hit the dialog exits. How can i disable that.
Add a handler for PreTranslateMessage to your dialog class like so...
BOOL CYourDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
if (pMsg->wParam == VK_RETURN)
return TRUE;
return CDialog::PreTranslateMessage(pMsg);
}
I think both your time to respond and your solution were perfect.
thanks. :)