rachelason
Programmer
HI! I want to get rid of All Files(*.*)from the type list when i try to open a document in an MFC program.
I had to do the same in the SaveAs which i managed to solve it by calling CFileDialog with the file types in the DOFileSave function.
But there is no DOFileOpen function to open a document with only one option(*.xtr - this is a file extension i have created through MFC).
I edited the string table, but no good.
I believe this is the code required to do it... but what i don't understand is where to add it. I tried in OnNewDocument(), serialize, etc etc.
<code>
CFileDialog ldFile1(TRUE, _T(".XTR"), NULL, OFN_HIDEREADONLY, _T("*.XTR"));
ldFile1.DoModal() ;
</code>
Any suggestion please?
Thanks
Rach
I had to do the same in the SaveAs which i managed to solve it by calling CFileDialog with the file types in the DOFileSave function.
But there is no DOFileOpen function to open a document with only one option(*.xtr - this is a file extension i have created through MFC).
I edited the string table, but no good.
I believe this is the code required to do it... but what i don't understand is where to add it. I tried in OnNewDocument(), serialize, etc etc.
<code>
CFileDialog ldFile1(TRUE, _T(".XTR"), NULL, OFN_HIDEREADONLY, _T("*.XTR"));
ldFile1.DoModal() ;
</code>
Any suggestion please?
Thanks
Rach