Question about CFileDialog
-
Hello all. I have a button that loads a file dialog, CFileDialog. I'm trying that the user enters a PATH name rather than a FILE name. However, the CFileDialog only allows me to enter file names. ¿What do I have to do? Here's what I'm doing, rather simple.
CFileDialog wndDialog( TRUE, NULL, NULL, OFN_PATHMUSTEXIST | OFN_HIDEREADONLY, NULL, this ); wndDialog.DoModal(); m_strDestPath = wndDialog.GetPathName(); SetDlgItemText(IDC_NEWTRAN_DESTPATH, m_strDestPath);
Regards, K.K. Only the good dies young... -
Hello all. I have a button that loads a file dialog, CFileDialog. I'm trying that the user enters a PATH name rather than a FILE name. However, the CFileDialog only allows me to enter file names. ¿What do I have to do? Here's what I'm doing, rather simple.
CFileDialog wndDialog( TRUE, NULL, NULL, OFN_PATHMUSTEXIST | OFN_HIDEREADONLY, NULL, this ); wndDialog.DoModal(); m_strDestPath = wndDialog.GetPathName(); SetDlgItemText(IDC_NEWTRAN_DESTPATH, m_strDestPath);
Regards, K.K. Only the good dies young...try the ::ShBrowseForFolder function. that's the standard Windows browse for folder dialog. Image Toolkits | Image Processing | Cleek
-
Hello all. I have a button that loads a file dialog, CFileDialog. I'm trying that the user enters a PATH name rather than a FILE name. However, the CFileDialog only allows me to enter file names. ¿What do I have to do? Here's what I'm doing, rather simple.
CFileDialog wndDialog( TRUE, NULL, NULL, OFN_PATHMUSTEXIST | OFN_HIDEREADONLY, NULL, this ); wndDialog.DoModal(); m_strDestPath = wndDialog.GetPathName(); SetDlgItemText(IDC_NEWTRAN_DESTPATH, m_strDestPath);
Regards, K.K. Only the good dies young...http://www.mindcracker.com/mindcracker/c_cafe/mfc/filedlg.asp[^] Does that Help? /* Just a Human Trying to Live in a Computers World. */