Click here to Skip to main content
15,918,742 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: "enter" key dismisses modal dialog! Pin
Chris Losinger3-Jul-02 11:32
professionalChris Losinger3-Jul-02 11:32 
GeneralRe: "enter" key dismisses modal dialog! Pin
ns3-Jul-02 11:40
ns3-Jul-02 11:40 
GeneralRe: "enter" key dismisses modal dialog! Pin
Chris Losinger3-Jul-02 11:43
professionalChris Losinger3-Jul-02 11:43 
GeneralRe: "enter" key dismisses modal dialog! Pin
ns3-Jul-02 11:49
ns3-Jul-02 11:49 
GeneralRe: "enter" key dismisses modal dialog! Pin
Chris Losinger3-Jul-02 11:57
professionalChris Losinger3-Jul-02 11:57 
GeneralA million thanks! Pin
ns3-Jul-02 12:00
ns3-Jul-02 12:00 
GeneralRe: "enter" key dismisses modal dialog! Pin
Christopher Lord3-Jul-02 15:17
Christopher Lord3-Jul-02 15:17 
GeneralRe: "enter" key dismisses modal dialog! Pin
Larry Antram3-Jul-02 16:25
Larry Antram3-Jul-02 16:25 
I don't do MDI or form views, so perhaps this suggestion may be incorrect, but in general I assume it is probably better to simply override the virtual OnOK (for Enter) and OnCancel (for Esc) methods... and modify each to not call the base methods (which dismiss the dialog).

An easy way to do this with normal dialogs (without doing any real coding) is to put temporary IDOK and IDCANCEL buttons on your dialog... then double click each to add handlers via classwizard... then after that delete the two buttons from the dialog template... and finally comment out the // CDialog::OnOK(); or // CDialog::OnCancel(); calls.

Regards, Larry Antram
Stardust Software

"I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones."
-- Albert Einstein
Generalgetting "System Name" and "User name" in windows xp.. Pin
Speedy3-Jul-02 10:38
Speedy3-Jul-02 10:38 
GeneralRe: getting "System Name" and "User name" in windows xp.. Pin
Jason Henderson3-Jul-02 18:05
Jason Henderson3-Jul-02 18:05 
GeneralVisual Studio .NET Installation Pin
Ryan B.3-Jul-02 9:01
Ryan B.3-Jul-02 9:01 
GeneralRe: Visual Studio .NET Installation Pin
Mazdak3-Jul-02 9:06
Mazdak3-Jul-02 9:06 
GeneralRe: Visual Studio .NET Installation Pin
Ranjan Banerji3-Jul-02 9:40
Ranjan Banerji3-Jul-02 9:40 
GeneralRe: Visual Studio .NET Installation Pin
Ryan B.3-Jul-02 9:55
Ryan B.3-Jul-02 9:55 
GeneralC++ questions Pin
3-Jul-02 6:56
suss3-Jul-02 6:56 
GeneralRe: C++ questions Pin
Hans Ruck3-Jul-02 7:47
Hans Ruck3-Jul-02 7:47 
GeneralRe: C++ questions Pin
Alan Chambers3-Jul-02 9:06
Alan Chambers3-Jul-02 9:06 
GeneralRe: C++ questions Pin
Scott H. Settlemier3-Jul-02 11:17
Scott H. Settlemier3-Jul-02 11:17 
GeneralRe: C++ questions Pin
3-Jul-02 16:56
suss3-Jul-02 16:56 
QuestionFind name of thread only by window handle? Pin
User 66583-Jul-02 6:28
User 66583-Jul-02 6:28 
AnswerRe: Find name of thread only by window handle? Pin
Nish Nishant3-Jul-02 6:42
sitebuilderNish Nishant3-Jul-02 6:42 
GeneralRe: Find name of thread only by window handle? Pin
User 66583-Jul-02 6:57
User 66583-Jul-02 6:57 
GeneralRe: Find name of thread only by window handle? Pin
Nish Nishant3-Jul-02 7:02
sitebuilderNish Nishant3-Jul-02 7:02 
GeneralStupid CEdit problem Pin
Hans Ruck3-Jul-02 6:26
Hans Ruck3-Jul-02 6:26 
GeneralRe: Stupid CEdit problem Pin
Nish Nishant3-Jul-02 6:38
sitebuilderNish Nishant3-Jul-02 6:38 

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.