How to Display Old-Style FileOpen Common Dialog in Windows 95

Last reviewed: September 29, 1995
Article ID: Q131282
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows 95 version 4.0
    

SUMMARY

If you want an application to revert back to the old-style FileOpen or SaveAs common dialog box, you must either provide a dialog template or a hook function in addition to not specifying the OFN_EXPLORER flag.

MORE INFORMATION

Windows 95 provides a new flag for the File Open or Save As common dialog box called OFN_EXPLORER. When set, this flag ensures that the File Open dialog box displays a user interface that is similar to the Windows Explorer (or so-called Explorer-style dialog box).

You may want your application to revert to the old Windows version 3.1 style dialog box. For example, you might want to maintain a user interface consistent with the Windows NT user interface. Windows NT version 3.51 currently does not support the new Explorer-style File Open common dialog box. The next version of Windows NT, however, should implement this new feature.)

To display the old-style common dialog box:

  • Don't specify the OFN_EXPLORER value in the OPENFILENAME structure's Flags member.
  • Provide a dialog template or a hook. If the application does not have either one, a simple hook that always returns FALSE should suffice.

NOTE: When you specify a hook function for the old-style common dialog box in Windows 95, the hDlg received in the hookProc is the actual handle to the dialog containing the standard controls. This is not true, however, for the new Explorer-style common dialog hookProc where the hDlg received is the handle to a child of the dialog box containing the standard controls. Therefore, to get a handle to the actual File Open or Save As dialog box, an application should call GetParent() on the hDlg passed to the hook procedure.


Additional reference words: 4.00 subdialog
KBCategory: kbui
KBSubcategory: UsrCmnDlg


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: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.