Hi,
Thank you for posting here.
>>Any way to don't close app when user press "ESC"?
I suggest you could try to override the PreTranslateMessage notification and block all VK_ESCAPE messages of WM_KEYDOWN.
Here is my code:
BOOL CMFCApplication85Dlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_ESCAPE) return TRUE;
else
return CDialogEx::PreTranslateMessage(pMsg);
}
Best Regards,
Jeanine Zhang
"Visual c++" forum will be migrating to a new home on
Microsoft Q&A !
We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on
Microsoft Q&A
!
For more information, please refer to the
sticky post.