LuisEnrique
Programmer
Hello everybody:
I have something weird happening when in a CFileDialog object that I create. From a menu, I choose a command that brings up a Open File dialog. The weird thing is happening when I click the File Type pull down where it says Executable Files (*.exe)|*.exe I able to see in the list the Executable Files (*.exe)|*.exe and under that some garbage. I just want that Open File dialog to have just 1 option (Executable Files (*.exe)|*.exe). This is the code that I have so far:
////////////////////////////////////////////////////////
static char szFilter[] = "Executable Files (*.exe)|*.exe";
CFileDialog openDialog(TRUE,NULL, NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter);
//Set the title of the dialog.
CString sTitle;
VERIFY(sTitle.LoadString(IDS_OPEN_WITH));
openDialog.m_ofn.lpstrTitle = sTitle;
int nResult = openDialog.DoModal();
if(IDCANCEL==nResult) return;
////////////////////////////////////////////////////////
Is there something that I need to do to correct this problem? I have a screenshot with the problem but I didn't see anything in this forum that I can post images. Any answer is more than welcome.
Best regards,
Luis E.
I have something weird happening when in a CFileDialog object that I create. From a menu, I choose a command that brings up a Open File dialog. The weird thing is happening when I click the File Type pull down where it says Executable Files (*.exe)|*.exe I able to see in the list the Executable Files (*.exe)|*.exe and under that some garbage. I just want that Open File dialog to have just 1 option (Executable Files (*.exe)|*.exe). This is the code that I have so far:
////////////////////////////////////////////////////////
static char szFilter[] = "Executable Files (*.exe)|*.exe";
CFileDialog openDialog(TRUE,NULL, NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, szFilter);
//Set the title of the dialog.
CString sTitle;
VERIFY(sTitle.LoadString(IDS_OPEN_WITH));
openDialog.m_ofn.lpstrTitle = sTitle;
int nResult = openDialog.DoModal();
if(IDCANCEL==nResult) return;
////////////////////////////////////////////////////////
Is there something that I need to do to correct this problem? I have a screenshot with the problem but I didn't see anything in this forum that I can post images. Any answer is more than welcome.
Best regards,
Luis E.