Re: Escape key
- From: "Alexander Grigoriev" <alegr@xxxxxxxxxxxxx>
- Date: Tue, 6 Feb 2007 21:30:31 -0800
Escape is handled by the DefDlgProc.
"David Ching" <dc@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:HB1yh.3663$MN.1106@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"Ajay Kalra" <ajaykalra@xxxxxxxxx> wrote in message
news:1170775864.294690.290940@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Duh... I guess look for it explicity in Pretraslate message woudl be
one way to do it:
BOOL CDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN &&
(pMsg->wParam == VK_ESCAPE))
return TRUE;
return CDialog::PreTranslateMessage(pMsg);
}
Yes, this would work very well. Maybe my tip about removing the
accelerator is bogus; there may not even be a VK_ESCAPE accelerator since
Escape only closes a CDialog, not a CWnd/CMainFrame
-- David (MVP)
.
- References:
- Escape key
- From: Ed
- Re: Escape key
- From: Ajay Kalra
- Re: Escape key
- From: David Ching
- Re: Escape key
- From: Ajay Kalra
- Re: Escape key
- From: David Ching
- Escape key
- Prev by Date: Re: sharing variables between dialog boxes
- Next by Date: Re: Question about Leverage source from Different Projects
- Previous by thread: Re: Escape key
- Next by thread: Re: Escape key
- Index(es):
Relevant Pages
|