|
-
August 10th, 1999, 10:09 AM
#1
Common Dialog Failure
Hi, I am just trying to open up a common dialog box, but it seems to sometimes close my program.
//Construct a file filter for the common dialog box
static char BASED_CODE szFilter[] = "HTML Files (*.htm)|*.htm|All Files (*.*)|*.*||";
//Open up a "Save As" commond dialog
CFileDialog cfd(FALSE, "htm", csSession, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter, NULL);
//If they cancelled lets get out of here
cfd.DoModal();
When I call the DoModal my program closes out. It is an SDI MFC app.
-
August 10th, 1999, 10:23 AM
#2
Re: Common Dialog Failure
Check out what csSession is and make sure it is valid. I changed it to NULL and your code worked fine.
Wayne
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
|