CFileDialog does not open
-
I use following code to open a CFileDialog: ... CFileDialog oFile(TRUE, "*.tab", m_strFile, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "MapInfo Layer (*.tab)|*.tab|Alle Files (*.*)|*.*||", this); if (oFile.DoModal()==IDCANCEL) { return; } ... If m_strFile is a string that points to a folder already exists (C:\) the File Dialog does not open. What is the reason?
-
I use following code to open a CFileDialog: ... CFileDialog oFile(TRUE, "*.tab", m_strFile, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "MapInfo Layer (*.tab)|*.tab|Alle Files (*.*)|*.*||", this); if (oFile.DoModal()==IDCANCEL) { return; } ... If m_strFile is a string that points to a folder already exists (C:\) the File Dialog does not open. What is the reason?
It may have something to do with the fact that the variable m_strFile should be a filename, not a folder. I'm not exactly sure why it wouldn't come up, but that's my first clue.
-
I use following code to open a CFileDialog: ... CFileDialog oFile(TRUE, "*.tab", m_strFile, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "MapInfo Layer (*.tab)|*.tab|Alle Files (*.*)|*.*||", this); if (oFile.DoModal()==IDCANCEL) { return; } ... If m_strFile is a string that points to a folder already exists (C:\) the File Dialog does not open. What is the reason?
Also, the second parameter should probably not have the "*." part. I have always just used the extension letters, such as "TXT" or "DAT" or "TAB". I never use the "*." part of the extensions. Your extra extension text could be causing some sort of strange internal error.
-
Also, the second parameter should probably not have the "*." part. I have always just used the extension letters, such as "TXT" or "DAT" or "TAB". I never use the "*." part of the extensions. Your extra extension text could be causing some sort of strange internal error.
The problem seems to be the Filename I put in: m_strFile The FileDlg. want to put the c:\ into the file Filename... ...it notice that c:\is not a valid filename and returns. I can force the dlg with OFN_NOVALIDATE not to close itself. This is fine ... ...but where I can put in the Initial folder?
-
Also, the second parameter should probably not have the "*." part. I have always just used the extension letters, such as "TXT" or "DAT" or "TAB". I never use the "*." part of the extensions. Your extra extension text could be causing some sort of strange internal error.