How to Disable Default Pushbutton Handling for MFC Dialog
Article ID: 122489
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Foundation Class Library 4.2, when used with:
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 1.5 Professional Edition
- Microsoft Visual C++ 1.0 Professional Edition
- Microsoft Visual C++ 2.0 Professional Edition
- Microsoft Visual C++ 4.0 Standard Edition
This article was previously published under Q122489
SUMMARY
Windows dialog boxes support the use of a default button (pushbutton) that
is automatically activated when the ENTER key is pressed while focus is not
on a command button. The MFC class library will automatically call the
CDialog::OnOK() virtual function for a dialog whenever the default button
(pushbutton) is activated by pressing the ENTER key.
This behavior conforms to the guidelines set forth by "The Windows
Interface: An Application Design Guide." This manual is included with the
Windows version 3.1 SDK documentation. It is also available from Microsoft
Press.
Additional query words: kbinf 1.00 1.50 2.00 2.10 2.50 3.00 4.00
Keywords: KB122489