|
-
November 15th, 2011, 04:33 AM
#1
Error while calling CFileDialog
Hi.
I have used CFileDialog to get the path of the file what users select.
When I programmed in Windows XP and Visual Studio 6.0, 2008
I didn't have any problem.
However, I changed my environment to Windows 7 & Visual Studio 2010,
since then, sometimes error is occurred.
It is not always, about 1 or 2 times per 5?
My code is here.
CString csTemp;
TCHAR szFilter[] = L"CSV Files(*.csv)|*.csv|";
CFileDialog fileDlg(TRUE, NULL, NULL, OFN_NOVALIDATE, szFilter);
if(IDOK == fileDlg.DoModal())
csTemp=fileDlg.GetPathName();
else
{
MessageBox(_T("File Open Fail"));
return;
}
When DoModal function is called. everything is stop.
cant stop debugging, no task manager, no ctrl+alt+del, just only reboot.
I changed the option "OFN_NOVALIDATE" to solve this problem...
unfortunately, it doesn't work.
if u have any good idea. plz help me.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|