DOC: CFileDialog::DoModal Does Not Return 0

Last reviewed: January 15, 1998
Article ID: Q162160
The information in this article applies to:
  • The Microsoft Foundation Classes (MFC) included with: - Microsoft Visual C++, 32-bit Edition, versions 2.0, 2.1, 2.2, 4.0,

         4.1, 4.2, 5.0
    

SUMMARY

The documentation for the Class Library Reference distributed with Visual C++ is incorrect. The documentation states:

   IDOK or IDCANCEL if the function is successful; otherwise 0. IDOK and
   IDCANCEL are constants that indicate whether the user selected the OK or
   Cancel button.

   If IDCANCEL is returned, you can call the Windows CommDlgExtendedError
   function to determine whether an error occurred.

The corrected documentation should read:

   IDOK or IDCANCEL. If IDCANCEL is returned, you can call the Windows
   CommDlgExtendedError function to determine whether an error occurred.

   IDOK and IDCANCEL are constants that indicate whether the user selected
   the OK or Cancel button.

MORE INFORMATION

This correction applies to the documentation for the following MFC common dialog classes: CFileDialog, CColorDialog, CFontDialog, CPageSetupDialog, CPrintDialog, and CFindReplaceDialog.

Note that 0 is not a legitimate return value for the MFC common dialog DoModal member function.


Additional query words: CfileDialog CColorDialog CfontDialog
CPageSetupDialog CPrintDialog CFindReplaceDialog
Keywords : MfcUI vcbuglist420 vcbuglist500 kbui
Technology : kbMfc
Platform : NT WINDOWS
Issue type : kbdocerr


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 15, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.