lpszFilterA series of string pairs that specify filters you can apply to the file. If you specify file filters, only selected files will appear in the Files list box. See the Res section for more information on how to work with file filters来自MSDN的权威解释,呵呵。
The lpszFilter parameter is used to determine the type of filename a file must have to be displayed in the file list box. The first string in the string pair describes the filter; the second string indicates the file extension to use. Multiple extensions may be specified using ‘;’ as the delimiter. The string ends with two ‘|’ characters, followed by a NULL character. You can also use a CString object for this parameter.For example, Microsoft Excel permits users to open files with extensions .XLC (chart) or .XLS (worksheet), among others. The filter for Excel could be written as:static char BASED_CODE szFilter[] = "Chart Files (*.xlc)|*.xlc|Worksheet Files (*.xls)|*.xls|Data Files (*.xlc;*.xls)|*.xlc; *.xls|All Files (*.*)|*.*||";算了,贴上完整的吧!FYI
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货