Click here to Skip to main content
15,909,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPreventing Escape key from closing dialog window Pin
Neil scsn22-Feb-07 7:51
Neil scsn22-Feb-07 7:51 
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 
Mark Salsbery wrote:
Maybe look for WM_KEYDOWN/WM_KEYUP messages for the ESC key and do nothing in response.


I don't think so. When the user presses the Esc or Enter, CDialog implementations will call EndDialog() immediately rather than passing on this message to WM_KEYDOWN handler. So the handler floats sadly in thin air. There is a lot of confusion on this and I do not find a better way than overriding the PreTranslateMessage</s>

Please read This[^] too!

Last modified: 17mins after originally posted --



The greater the difficulty, the greater the glory.
- Marcus Tullius Cicero

GeneralRe: Preventing Escape key from closing dialog window Pin
Mark Salsbery23-Feb-07 6:29
Mark Salsbery23-Feb-07 6:29 
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 

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.