CFileDialog doesn't Update
Matthew Barrett -- matt@midas.mt.wsmr.army.mil Wednesday, June 12, 1996 I'm running VC4.1 under Windows 95. CFileDialog doesn't appear to update properly in VC4. When a File Open dialog box is first displayed, all filenames in the current directory with the default file template (e.g. *.txt) are properly displayed in the dialog box's treeview. However, if the user switches the "Files of type:" combo box to something else (e.g. *.*), nothing is displayed in the treeview anymore except for subordinate directories. Only by manually typing in the second template (e.g. *.*) into the "File name:" edit box will the correct filenames be displayed. What's going on here? The following code works fine in the 16-bit version of VC, but not in the 32-bit version: CFileDialog fd ( TRUE, NULL, "*.txt", OFN_OVERWRITEPROMPT, "Text Files (*.txt) | *.txt |All Files (*.*) | *.* ||", NULL ); if ( fd.DoModal () == IDOK ) { } Matt Barrett matt@wsmr-emh80.army.mil
Shiva Shenoy -- shiva@netbuild.com Thursday, June 13, 1996 [Mini-digest: 2 responses] Try removing the space before the "*.txt" and before the "*.*" and after the | In otherwords make it exactly like this: >"Text Files (*.txt) |*.txt |All Files (*.*) |*.* ||", NULL ); Hope thsi helps Shiva > -----From: "Jeff Hopwood"Get rid of the spaces around your wildcard specifications. Your filter is trying to match '*.* ', not '*.*' Jeff Hopwood Hilgraeve, Inc.
| Вернуться в корень Архива |