Click here to Skip to main content
15,929,346 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Preventing Escape key from closing dialog window [modified] Pin
Mark Salsbery22-Feb-07 8:35
Mark Salsbery22-Feb-07 8:35 
GeneralRe: Preventing Escape key from closing dialog window Pin
prasad_som22-Feb-07 18:44
prasad_som22-Feb-07 18:44 
GeneralRe: Preventing Escape key from closing dialog window Pin
Mark Salsbery22-Feb-07 20:38
Mark Salsbery22-Feb-07 20:38 
GeneralRe: Preventing Escape key from closing dialog window Pin
prasad_som22-Feb-07 21:34
prasad_som22-Feb-07 21:34 
GeneralRe: Preventing Escape key from closing dialog window Pin
Rajesh R Subramanian22-Feb-07 22:07
professionalRajesh R Subramanian22-Feb-07 22:07 
GeneralRe: Preventing Escape key from closing dialog window Pin
Mark Salsbery23-Feb-07 6:12
Mark Salsbery23-Feb-07 6:12 
GeneralRe: Preventing Escape key from closing dialog window [modified] Pin
Rajesh R Subramanian22-Feb-07 22:01
professionalRajesh R Subramanian22-Feb-07 22:01 
GeneralRe: Preventing Escape key from closing dialog window Pin
Mark Salsbery23-Feb-07 6:29
Mark Salsbery23-Feb-07 6:29 
LOL I get it! The OP did not mention MFC - you all assumed that - you got it right...good for
you.
Most times that I assume that, the OP comes back and tells me "I'm not using MFC". I can't win.

I suggested eating the ESC key, exactly what Prasad did in his PreTranslateMsg handler.

You are right it won't work in an MFC OnKeyDown handler - the key has been translated at that
point so an escape key never gets there. That's why in MFC it needs to be caught in
PreTranslateMsg.

In non MFC you'd have to look for the WM_KEYDOWN and not pass it on to be translated.

Either way you're eating the keystroke Smile | :)

Cheers!
Mark




"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."

AnswerRe: Preventing Escape key from closing dialog window Pin
Newbie0022-Feb-07 8:45
Newbie0022-Feb-07 8:45 
AnswerRe: Preventing Escape key from closing dialog window Pin
Cedric Moonen22-Feb-07 9:37
Cedric Moonen22-Feb-07 9:37 
AnswerRe: Preventing Escape key from closing dialog window Pin
ThatsAlok22-Feb-07 17:34
ThatsAlok22-Feb-07 17:34 
GeneralRe: Preventing Escape key from closing dialog window Pin
Rajesh R Subramanian22-Feb-07 18:21
professionalRajesh R Subramanian22-Feb-07 18:21 
GeneralRe: Preventing Escape key from closing dialog window Pin
ThatsAlok22-Feb-07 19:04
ThatsAlok22-Feb-07 19:04 
GeneralRe: Preventing Escape key from closing dialog window [modified] Pin
Rajesh R Subramanian22-Feb-07 19:13
professionalRajesh R Subramanian22-Feb-07 19:13 
GeneralRe: Preventing Escape key from closing dialog window Pin
PJ Arends22-Feb-07 21:22
professionalPJ Arends22-Feb-07 21:22 
GeneralRe: Preventing Escape key from closing dialog window Pin
Rajesh R Subramanian22-Feb-07 22:09
professionalRajesh R Subramanian22-Feb-07 22:09 
AnswerRe: Preventing Escape key from closing dialog window Pin
prasad_som22-Feb-07 18:13
prasad_som22-Feb-07 18:13 
GeneralRe: Preventing Escape key from closing dialog window Pin
Rajesh R Subramanian22-Feb-07 18:22
professionalRajesh R Subramanian22-Feb-07 18:22 
JokeRe: Preventing Escape key from closing dialog window Pin
prasad_som22-Feb-07 18:39
prasad_som22-Feb-07 18:39 
AnswerRe: Preventing Escape key from closing dialog window Pin
Ravi Bhavnani23-Feb-07 4:42
professionalRavi Bhavnani23-Feb-07 4:42 
QuestionAny DirectShow gurus? Pin
Joe Woodbury22-Feb-07 7:07
professionalJoe Woodbury22-Feb-07 7:07 
AnswerRe: Any DirectShow gurus? Pin
Mark Salsbery22-Feb-07 7:38
Mark Salsbery22-Feb-07 7:38 
GeneralRe: Any DirectShow gurus? Pin
Joe Woodbury22-Feb-07 12:10
professionalJoe Woodbury22-Feb-07 12:10 
GeneralRe: Any DirectShow gurus? Pin
Mark Salsbery22-Feb-07 13:37
Mark Salsbery22-Feb-07 13:37 
Questionhelp with NtQueryObject and listing objects Pin
van-ux22-Feb-07 6:42
van-ux22-Feb-07 6:42 

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.