文件框设置
来源:互联网 发布:厦门市金马甲网络 编辑:程序博客网 时间:2024/06/01 15:43
CFileDialog fileDlg(FALSE); //构造对话框对象(FALSE)表示保存(TRUE)表示打开
MSDN里有说明,要以 两个 '|' 结尾,你在最后加上两个 ‘|’ 就好了,如下:
CFileDialog fileDlg(TRUE,NULL,NULL,0,"cpp文件(*.cpp)|*.cpp|txt文件(*.txt)|*.txt||");
// CFileDialog fileDlg(FALSE,"xls","*.xls", OFN_HIDEREADONLY | OFN_ALLOWMULTISELECT,"导出文件(*.xls)|*.xls|");
CString filename;
CString fileControl = " ";
CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();
CControlInfo *pControlInfo = CControlInfo::GetSingletonPtr();
CTime time = CTime::GetCurrentTime();
CString sTime;
sTime.Format("%d-%d-%d %d:%d:%d", time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond());
CString sNameTime;
sNameTime.Format("//Bin//DataFile//%d-%d-%d %d.%d.%d.csv", time.GetYear(), time.GetMonth(), time.GetDay(), time.GetHour(), time.GetMinute(), time.GetSecond());
filename = pControlInfo->GetSysCurPath() + sNameTime;
CFile file(filename, CFile::modeCreate | CFile::modeWrite);
- 文件框设置
- js设置文件框可编辑
- 文件上传设置 弹框选择文件的 格式
- SetDlgItemText设置控件文件
- 页面文件的设置
- 局域网文件共享设置
- 设置文件的size
- GVIM设置文件编码
- 设置文件缩略图
- 文件自动归档设置
- VC头文件设置
- Linux core文件设置
- virtualbox 文件共享设置
- emacs设置文件关联
- 文件共享设置
- 获取 设置文件时间
- SVN过滤文件设置
- 设置文件目录
- MMU,cache,裸机嵌入式C编程还有带操作系统的编程
- C++学习连载—合并排序及其遇到的问题
- CentOS自动获取IP
- 安装php模块igbinary
- 关于LineChart使用上的一些体会与经验分享
- 文件框设置
- UITextView添加圆角边框
- 【趋势科技2013年第3季度安全威胁】之病毒威胁篇
- Linux上如何通过 OpenVPN 建立安全的远程连接
- 基于 mini2440 电阻式触摸屏(四):mini2440触摸屏驱动分析
- struts2 EXCEL导入
- iptables限速 iptables限制流量
- 上行下行带宽
- IntelliJ IDEA 和 Eclipse 主要区别