void CtestDlg::OnBnClickedLjButton()
{
// TODO: Add your control notification handler code here
CString FilePathName,filter;
filter="??(*.??)|*.??||*.*||(*)";
CFolderPickerDialog dlg(filter);
if (dlg.DoModal()==IDOK)
{
FilePathName = dlg.GetPathName();
m_FilePath = FilePathName;
UpdateData(FALSE);
}
}
如上代码如何修改可以实现在路径选择时候,把整个文件夹作为路径。
用SHFileOperation来选择文件夹
CFolderPickerDialog 这个类就是文件夹选择对话框,应该选择文件夹没问题呀。
这个需要代码来实现,判断一个传入的字符串是文件、还是文件夹,然后进行对应的处理。
这个需要代码来实现,判断一个传入的字符串是文件、还是文件夹,然后进行对应的处理。