I use CFileDialogto display an open file dialog box. I set the filter as follows:
static TCHAR BASED_CODE szFilter[] = _T("Chart Files (*.xlc)|*.xlc|")
_T("Worksheet Files (*.xls)|*.xls|Data Files (*.xlc;*.xls)|")
_T("*.xlc; *.xls|All Files (*.*)|*.*||");
I need to set the default file type as “Worksheet Files” whenever I have a DoModaldialog box. I can’t figure out how to do this. MS Paint does, it selects "All image files" when we open the open file dialog.
Please let me know how to do this.
source
share