标签:style blog ar color sp for on 文件 div
我们都知道MFC打开文件的CFileDialog类。
CString m_strFilePathName; CFileDialog dlg(TRUE,NULL,NULL,OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT,_T("All Files(*.txt)|*.txt|所有文件(*.*)|*.*|"),NULL); if (dlg.DoModal()) { m_strFilePathName = dlg.GetPathName(); }
char szDir[MAX_PATH]; BROWSEINFO bi; ITEMIDLIST *pidl; bi.hwndOwner = this->m_hWnd; bi.pidlRoot = NULL; bi.pszDisplayName = szDir; bi.lpszTitle = "请选择目录"; bi.ulFlags = BIF_STATUSTEXT | BIF_USENEWUI | BIF_RETURNONLYFSDIRS; bi.lpfn = NULL; bi.lParam = 0; bi.iImage = 0; pidl = SHBrowseForFolder(&bi); if(pidl == NULL) return; if(!SHGetPathFromIDList(pidl, szDir))
标签:style blog ar color sp for on 文件 div
原文地址:http://www.cnblogs.com/luzhiw/p/4164824.html