Click here to Skip to main content
15,914,410 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Esc Button use for Close the Dialog Box. Pin
Gary R. Wheeler7-Jun-08 1:05
Gary R. Wheeler7-Jun-08 1:05 
GeneralRe: Esc Button use for Close the Dialog Box. Pin
Nelek7-Jun-08 2:13
protectorNelek7-Jun-08 2:13 
GeneralRe: Esc Button use for Close the Dialog Box. Pin
Gary R. Wheeler7-Jun-08 2:18
Gary R. Wheeler7-Jun-08 2:18 
GeneralRe: Esc Button use for Close the Dialog Box. Pin
Nelek7-Jun-08 2:22
protectorNelek7-Jun-08 2:22 
GeneralRe: Esc Button use for Close the Dialog Box. Pin
Rajesh R Subramanian7-Jun-08 6:16
professionalRajesh R Subramanian7-Jun-08 6:16 
AnswerRe: Esc Button use for Close the Dialog Box. Pin
Nelek7-Jun-08 2:11
protectorNelek7-Jun-08 2:11 
GeneralRe: Esc Button use for Close the Dialog Box. Pin
Le@rner7-Jun-08 2:44
Le@rner7-Jun-08 2:44 
GeneralRe: Esc Button use for Close the Dialog Box. Pin
Jijo.Raj7-Jun-08 3:48
Jijo.Raj7-Jun-08 3:48 
If you just want to disable the Escape button, then do it in the PreTranslateMessage(). See sample below. Now your escape keydown will not be processed. So it won't affect the behavior of cancel and close buttons.

BOOL CDialogDlg::PreTranslateMessage(MSG* pMsg) 
{
    if (pMsg->message == WM_KEYDOWN && (pMsg->wParam == VK_ESCAPE ))
    {
        return TRUE;
    }
	
    return CDialog::PreTranslateMessage(pMsg);
}


Regards,
Jijo.

_____________________________________________________

http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.

GeneralRe: Esc Button use for Close the Dialog Box. Pin
Nelek7-Jun-08 7:05
protectorNelek7-Jun-08 7:05 
AnswerRe: Esc Button use for Close the Dialog Box. Pin
Michael Schubert7-Jun-08 3:38
Michael Schubert7-Jun-08 3:38 
QuestionEncryption/Decryption Pin
H4u327-Jun-08 0:07
H4u327-Jun-08 0:07 
AnswerRe: Encryption/Decryption Pin
Saurabh.Garg7-Jun-08 3:03
Saurabh.Garg7-Jun-08 3:03 
AnswerRe: Encryption/Decryption Pin
Hamid_RT7-Jun-08 21:15
Hamid_RT7-Jun-08 21:15 
QuestionColumn Count ? Pin
kk.tvm6-Jun-08 23:59
kk.tvm6-Jun-08 23:59 
AnswerRe: Column Count ? Pin
Mukesh Kumar7-Jun-08 1:00
Mukesh Kumar7-Jun-08 1:00 
GeneralRe: Column Count ? Pin
kk.tvm7-Jun-08 3:17
kk.tvm7-Jun-08 3:17 
AnswerRe: Column Count ? Pin
Hamid_RT7-Jun-08 21:17
Hamid_RT7-Jun-08 21:17 
QuestionFocus on ListCtrl. Pin
Le@rner6-Jun-08 23:36
Le@rner6-Jun-08 23:36 
AnswerRe: Focus on ListCtrl. Pin
Hamid_RT7-Jun-08 21:16
Hamid_RT7-Jun-08 21:16 
GeneralRe: Focus on ListCtrl. Pin
Le@rner8-Jun-08 18:31
Le@rner8-Jun-08 18:31 
QuestionShutdown a remote machine ? (VC++) Pin
mrin6-Jun-08 23:21
mrin6-Jun-08 23:21 
AnswerRe: Shutdown a remote machine ? (VC++) Pin
Gary R. Wheeler7-Jun-08 1:07
Gary R. Wheeler7-Jun-08 1:07 
QuestionVC++ 6, MFC, ComboBox, load list from file? [modified] Pin
rolfhorror6-Jun-08 22:57
rolfhorror6-Jun-08 22:57 
AnswerRe: VC++ 6, MFC, ComboBox, load list from file? Pin
sudhir_Kumar6-Jun-08 23:25
sudhir_Kumar6-Jun-08 23:25 
GeneralRe: VC++ 6, MFC, ComboBox, load list from file? Pin
rolfhorror6-Jun-08 23:27
rolfhorror6-Jun-08 23:27 

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.