
Customizing Open File Dialog -- am I right?
On Wed, 15 Mar 2000 22:19:21 -0500, Scott McPhillips
Quote:
>> In my SDI app I wanted an Open File dialog to open in a specific
>> directory so I:
>> 1) remmed out my App's ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
>> from its message map
>> 2) Created a new message handler for OnFileOpen under the App class
>> 3) In the new OnFileOpen handler:
>> a) I instantiate a CFileDialog object, dlg, define its intial
>> directory path using the "dlg.m_ofn.lpstrInitialDir" member
>> b) and, finally, call CWinApp::OpenDocumentFile(dlg.GetPathName())
>> when DoModal()== IDOK
>> Everything seems to work ok. But I'm not absolutely confident about
>> the above methods used.
>> Is this procedure the correct way to customize the Open File Dialog?
>> Thanks for any help.
>> Graham
>Exactly right.
>--
>Scott McPhillips [VC++ MVP]
Thanks you for the confirmation, Scott.
It's very much appreciated!
Graham