打开对话框及文件过滤
来源:互联网 发布:移动网络破解 编辑:程序博客网 时间:2024/05/09 16:49
CFileDialog fileDlg(TRUE);
fileDlg.m_ofn.lpstrFilter="DOC File(*.doc)/0*.doc;*.docx/0All Files(*.*)/0*.*/0
/0";
fileDlg.DoModal();
这三行代码就构建了一个“打开”文件对话框;
特别需要关注的是文件的过滤:
MSDN如是说:
1、m_ofn is a structure of type OPENFILENAME;
2、OPENFILENAME结构体中有一个成员项lpstrFilter:
The first string in each pair is a display string that describes the filter (for example, "Text Files"), and the second string specifies the filter pattern (for example, "*.TXT"). To specify multiple filter patterns for a single display string, use a semicolon to separate the patterns (for example, "*.TXT;*.DOC;*.BAK"). If lpstrFilter is NULL, the dialog box does not display any filters.
- 打开对话框及文件过滤
- MFC文件打开、保存对话框 及文件创建、存储
- 打开文件对话框选择文件位置,及给定文件路径来打开文件
- MFC打开对话框中格式过滤
- 打开文件保存对话框
- VBS 打开文件对话框
- 文件打开保存对话框
- 打开文件对话框相关
- MFC打开文件对话框
- 打开文件对话框
- 打开文件对话框
- VC 打开文件对话框
- 打开文件对话框
- Qt 打开文件对话框
- 打开文件对话框
- 打开->选择文件对话框
- MFC 文件打开对话框
- 打开选择文件对话框
- 两个.cpp文件合并的问题
- Spring学习总结1(基础与IOC依赖注入)
- NavigationController导航栏中添加多个UIBarButtonItem
- web判断网络接入方式
- 程序员成才的关键——内在兴趣和善于发现
- 打开对话框及文件过滤
- 测试代码效率时一定要用高精度的Stopwatch时间戳,避免出现误差。
- C# ASP.NET里@的妙用
- ADO.NET笔记三
- eclipse javascript 插件 spket ext
- Symbian S60第三版 MR、FP1、FP2 机型的本质区别
- org.eclipse.ui.ide, Menu and toolbar paths
- 深入剖析C 重载函数的应用
- WCF热门问题编程示例(2)多个实例调用一个WCF服务操作,需要等待服务响应吗