CString FileName = dlg.GetPathName(); //获取文件路径名 如D:\pic\abc.bmp using std::string; string s = (CStringA)FileName;