Click here to Skip to main content
15,921,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Capture OnLButtonDown on picture control. Pin
Naveen1-Mar-07 0:37
Naveen1-Mar-07 0:37 
GeneralRe: Capture OnLButtonDown on picture control. Pin
llp00na1-Mar-07 1:12
llp00na1-Mar-07 1:12 
GeneralRe: Capture OnLButtonDown on picture control. Pin
Naveen1-Mar-07 1:18
Naveen1-Mar-07 1:18 
GeneralRe: Capture OnLButtonDown on picture control. Pin
llp00na1-Mar-07 1:33
llp00na1-Mar-07 1:33 
GeneralRe: Capture OnLButtonDown on picture control. Pin
llp00na1-Mar-07 1:39
llp00na1-Mar-07 1:39 
QuestionDialog Problems in Vista Pin
NiceNaidu1-Mar-07 0:15
NiceNaidu1-Mar-07 0:15 
Questionopendesktop returning 170 error code (The requested resource is in use. ERROR_BUSY) Pin
Yogish A J28-Feb-07 23:26
Yogish A J28-Feb-07 23:26 
QuestionCatching the Escape Key (MFC Dialogs) Pin
waxie28-Feb-07 23:16
waxie28-Feb-07 23:16 
Hi guys,

I've been reading some forums about catching the escape key. I have this property page and when I press the escape key, instead of closing (which should have happened by default), does not close.
There were some suggestions like overriding OnClose and OnCancel or using PreTranslateMessage which has this code:

BOOL MFCDigPropPage::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message==WM_KEYDOWN)
{
if(pMsg->wParam==VK_RETURN || pMsg->wParam==VK_ESCAPE)
MessageBox("Pressed the escape or enter key!");
}
return CDialog::PreTranslateMessage(pMsg);
}

This code worked when I created a simple dialog box with just the OK and Cancel button on it. But when i tried it on my property page, it does not work anymore. Any suggestions/ideas regarding this one??? I would really really really appreciate any help on this.

Thanks! Smile | :)


Rose | [Rose] waxie
AnswerRe: Catching the Escape Key (MFC Dialogs) Pin
Naveen28-Feb-07 23:46
Naveen28-Feb-07 23:46 
AnswerRe: Catching the Escape Key (MFC Dialogs) Pin
prasad_som28-Feb-07 23:48
prasad_som28-Feb-07 23:48 
AnswerRe: Catching the Escape Key (MFC Dialogs) Pin
Michael Dunn1-Mar-07 5:59
sitebuilderMichael Dunn1-Mar-07 5:59 
QuestionAnnotation on the Screen Pin
Vissu8928-Feb-07 23:14
Vissu8928-Feb-07 23:14 
AnswerRe: Annotation on the Screen Pin
ThatsAlok28-Feb-07 23:21
ThatsAlok28-Feb-07 23:21 
Questionhow to distribute last column of list control to fit into client area? Pin
rakeshbbaldha28-Feb-07 22:52
rakeshbbaldha28-Feb-07 22:52 
AnswerRe: how to distribute last column of list control to fit into client area? Pin
Naveen28-Feb-07 23:08
Naveen28-Feb-07 23:08 
GeneralRe: how to distribute last column of list control to fit into client area? Pin
rakeshbbaldha28-Feb-07 23:14
rakeshbbaldha28-Feb-07 23:14 
GeneralRe: how to distribute last column of list control to fit into client area? Pin
Naveen28-Feb-07 23:40
Naveen28-Feb-07 23:40 
GeneralRe: how to distribute last column of list control to fit into client area? Pin
rakeshbbaldha1-Mar-07 0:58
rakeshbbaldha1-Mar-07 0:58 
AnswerRe: how to distribute last column of list control to fit into client area? Pin
Michael Dunn1-Mar-07 6:00
sitebuilderMichael Dunn1-Mar-07 6:00 
QuestionDerive Class from CTime Pin
e-DJ28-Feb-07 21:46
e-DJ28-Feb-07 21:46 
AnswerRe: Derive Class from CTime Pin
Naveen28-Feb-07 22:32
Naveen28-Feb-07 22:32 
GeneralRe: Derive Class from CTime Pin
e-DJ28-Feb-07 23:34
e-DJ28-Feb-07 23:34 
GeneralRe: Derive Class from CTime Pin
Naveen1-Mar-07 0:21
Naveen1-Mar-07 0:21 
GeneralRe: Derive Class from CTime Pin
e-DJ1-Mar-07 4:19
e-DJ1-Mar-07 4:19 
AnswerRe: Derive Class from CTime Pin
Nibu babu thomas28-Feb-07 22:55
Nibu babu thomas28-Feb-07 22:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.