kronski
August 10th, 1999, 10:09 AM
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.
//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.