| 您的位置: >> 相关知识 >> 桌面应用程序 >> Visual C/C++ >> |
|
合金网络科技 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 添加日期:2008-2-2 点击次数:0次 |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
OPENFILENAME ofn; ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(OPENFILENAME); ofn.hwndOwner = GetSafeHwnd(); ofn.lpstrFile = new TCHAR[MAX_PATH * 500]; ofn.nMaxFile = MAX_PATH * 500; ZeroMemory(ofn.lpstrFile, ofn.nMaxFile * sizeof(TCHAR)); ofn.lpstrFilter = 'All Files\0*.*\0\0'; ofn.nFilterIndex = 0; ofn.lpstrFileTitle = NULL; ofn.nMaxFileTitle = 0; ofn.lpstrInitialDir = NULL; ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT | OFN_EXPLORER | OFN_HIDEREADONLY; // Display the Open dialog box. CStringArray arFiles; if (GetOpenFileName(&ofn)) { LPCTSTR lpFile = ofn.lpstrFile; if (lpFile[lstrlen(lpFile) + 1] == 0)//one file { arFiles.Add(lpFile); } else { lpFile += lstrlen(lpFile) + 1;//first file while(lpFile[0] != 0) { CString strFilePath(ofn.lpstrFile); strFilePath.TrimRight('\\'); strFilePath += CString('\\') + lpFile; arFiles.Add(strFilePath); lpFile += lstrlen(lpFile) + 1;//Next file } } } delete[] ofn.lpstrFile; |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "凌风微型文章系统",针对"搜索引擎"完美设计,提高"搜索引擎"对网站容量,质量的评估值,"扁平化,转静态 ..." |