为什么我的CFileDialog 不能打开多个文件? 为什么CFileDialog 不能打开多个文件?可以同时打二十多个文件但不能多了,否则点“打开”反回的也不是IDOK,为什么,问题是在m_ofn吧,可么做呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 typedef struct tagOFN { // ofn DWORD lStructSize; HWND hwndOwner; HINSTANCE hInstance; LPCTSTR lpstrFilter; LPTSTR lpstrCustomFilter; DWORD nMaxCustFilter; // DWORD nFilterIndex; LPTSTR lpstrFile; DWORD nMaxFile; LPTSTR lpstrFileTitle; DWORD nMaxFileTitle; LPCTSTR lpstrInitialDir; LPCTSTR lpstrTitle; DWORD Flags; WORD nFileOffset; WORD nFileExtension; LPCTSTR lpstrDefExt; DWORD lCustData; LPOFNHOOKPROC lpfnHook; LPCTSTR lpTemplateName; } OPENFILENAME; 可能与下面的成员有关吧: DWORD nMaxCustFilter; // DWORD nMaxFile; DWORD nMaxFileTitle; char buf[100000]; memset(buf,NULL,100000); CFileDialog FileDlg(TRUE,"*.exe",NULL,OFN_ALLOWMULTISELECT, "All files (*.*)|*.*||"); FileDlg.m_ofn.nMaxFile=100000; FileDlg.m_ofn.lpstrFile=buf; if(FileDlg.DoModal()==IDOK) { POSITION pos=FileDlg.GetStartPosition(); while(pos) { MessageBox(FileDlg.GetNextPathName(pos)); } }上面是笨方法! http://www.codeproject.com/dialog/PJA_MultiSelect.asp上面是聪明的方法:) 一个很基础的问题 在DLL里导出类? 高手来看看,关于CSocket编程问题,求助 麻烦高手帮我解释一下下列的几条语句,越详细越好,谢谢 如何获得单文档FORMVIEW界面的那种灰色 为什么使用capPreview捕捉视频会出现图像丢失,黑色 IE插件是不是要用到ActiveX技术? 怎样得到一个字符的ACSII码和得到一个ACSII码的字符? 是关于IHTMLDocument2的问题 高手请进!jenson802哪里去了 socket发送文件问题!(附文件请求、响应包结构) 用SendMessage控制其他程序的问题?
DWORD lStructSize;
HWND hwndOwner;
HINSTANCE hInstance;
LPCTSTR lpstrFilter;
LPTSTR lpstrCustomFilter;
DWORD nMaxCustFilter; //
DWORD nFilterIndex;
LPTSTR lpstrFile;
DWORD nMaxFile;
LPTSTR lpstrFileTitle;
DWORD nMaxFileTitle;
LPCTSTR lpstrInitialDir;
LPCTSTR lpstrTitle;
DWORD Flags;
WORD nFileOffset;
WORD nFileExtension;
LPCTSTR lpstrDefExt;
DWORD lCustData;
LPOFNHOOKPROC lpfnHook;
LPCTSTR lpTemplateName;
} OPENFILENAME;
可能与下面的成员有关吧:
DWORD nMaxCustFilter; //
DWORD nMaxFile;
DWORD nMaxFileTitle;
memset(buf,NULL,100000); CFileDialog FileDlg(TRUE,"*.exe",NULL,OFN_ALLOWMULTISELECT,
"All files (*.*)|*.*||");
FileDlg.m_ofn.nMaxFile=100000;
FileDlg.m_ofn.lpstrFile=buf; if(FileDlg.DoModal()==IDOK)
{
POSITION pos=FileDlg.GetStartPosition();
while(pos)
{
MessageBox(FileDlg.GetNextPathName(pos));
}
}上面是笨方法!