[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::visualc

Title:Microsoft Visual C/C++
Moderator:PLUGH::needle
Created:Tue Mar 16 1993
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1121
Total number of notes:4385

1080.0. "Esc key causes MFC dialog box app to exit" by OZROCK::GROHN () Mon Feb 03 1997 01:55

    Anyone know how to stop a MFC dialog box exiting when the user presses
    the escape key?
T.RTitleUserPersonal
Name
DateLines
1080.1STAR::DZIEDZICTony Dziedzic - DTN 381-2438Mon Feb 03 1997 07:264
    The Windows dialog box procedure (or MFC's version of it) sends a
    WM_COMMAND with an ID of IDCANCEL when it detects an escape.  If
    you remove any message handlers for IDCANCEL (e.g., your Cancel
    button) that may have the desired effect.