jhattingh
asked on
CFileDialog Question...
When I use CFileDialog, giving users the ability to sort by file type through the use of the drop-down list, how do I know what they "chose"?
You see, I'm finding that people often don't put a file extension because they believe (understandably) that the context will dictate the file extension, and it's causing me a small headache.
You see, I'm finding that people often don't put a file extension because they believe (understandably) that the context will dictate the file extension, and it's causing me a small headache.
ASKER
This is what I am currently doing:
strOutputPath = dlg.GetPathName();
strExt = dlg.GetFileExt();
strTitle = dlg.GetFileTitle();
if (strExt.IsEmpty())
{
AfxMessageBox("Please browse again and specify a file extension for your output file");
return false;
}
strExt *does* come up empty...
Thanks for the response...
strOutputPath = dlg.GetPathName();
strExt = dlg.GetFileExt();
strTitle = dlg.GetFileTitle();
if (strExt.IsEmpty())
{
AfxMessageBox("Please browse again and specify a file extension for your output file");
return false;
}
strExt *does* come up empty...
Thanks for the response...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
CString CFileDialog::GetFileExt();