Microsoft KB Archive/145687

= DOC: CFileDialog Filter String Won't Work Under Windows 95 =

Article ID: 145687

Article Last Modified on 11/21/2006

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 2.2

 Microsoft Visual C++ 4.0 Standard Edition 

-



This article was previously published under Q145687



SUMMARY
If sample code that lists an example filter string at the bottom of the CFileDialog::CFileDialog page in the Class Library Reference is used as a filter string with a CFileDialog, the filter string will not work properly on the Windows 95 Explorer-style common file dialog.



MORE INFORMATION
The Explorer-style common dialog will not accept spaces around the '|' vertical bar characters used to separate elements of the filter string.

The line of sample code should read: static char BASED_CODE szFilter[] = "Chart Files (*.xlc)|*.xlc|Worksheet Files(*.xls)|*.xls|   Data Files (*.xlc;*.xls)|*.xlc;*.xls|All Files (*.*)|*.*||"; This documentation problem was fixed in Visual C++ 4.1.

Additional query words: 2.20 4.00 4.10 CFileDialog m_ofn lpszFilter

Keywords: kbbug kbcmndlgfileo kbdocfix kbfix kbuidesign kbvc410fix KB145687

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.