filtered open file dialog 
Author Message
 filtered open file dialog

could someone please give me some example code for a CFileDialog that
will open files, and that has a filter?

thx alot!



Thu, 29 May 2003 20:17:36 GMT  
 filtered open file dialog
Hi there,

Take a look in MSDN library in CFileDialog entry.
Cheers,
--
M. Shokuie Nia
MSVC++ Programmer


Quote:
> could someone please give me some example code for a CFileDialog that
> will open files, and that has a filter?

> thx alot!



Fri, 30 May 2003 02:11:44 GMT  
 filtered open file dialog
 // Create a file dialog box to get file selection from user.

 CString FileFilter = CString("txt files (*.txt)|*.txt")
        + CString("All files (*.*)|*.*||");

 CFileDialog FileDlg ( TRUE, NULL, NULL,
  OFN_PATHMUSTEXIST | OFN_HIDEREADONLY,
  FileFilter);

 // Control the settings and behavior of the dialog box
 // by editing the OPENFILENAME structure it uses.

 FileDlg.m_ofn.lpstrTitle = "Open Your File";

 // Open the file dialog box and get the filename

 if ( FileDlg.DoModal() != IDOK ) { return; };
 CString Fname = FileDlg.GetPathName();


Quote:
> could someone please give me some example code for a CFileDialog that
> will open files, and that has a filter?

> thx alot!



Sat, 31 May 2003 02:57:55 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. HOW TO Filter Files Without File Extention in Open File Dialog Box

2. File extension filtering for the file dialog presented for file opening

3. Change file index filter of the standard file open/save dialog

4. Multiple Filters in File Open/Save Dialog

5. Adding new filters to the open dialog box

6. Multiple type filters in open dialogs

7. How to set Open dialog filters?

8. changing file open filter string

9. a few question about grayed menus, open file filters

10. File Open Dialog - Open button Enable&Disable

11. File Open Dialog - Open button Enable&Disable

12. File Open Dialog - Open button Enable&disable

 

 
Powered by phpBB® Forum Software