CFileDialog Default Directory
-
I need to set the default file open folder for open file in a doc/view/mdi app. I know about the win32 api structure containing an initial folder parameter. The file is serialized. Do I have to completely subclass the dialog or is there a way to modify that structure variable capturing the menu message on File Open and then pass to the standard CFileOpen without rewriting all of it? Also, what module (MainFrame, ChildFrame, etc, do I capture the message and set the initial folder variable, then pass on to the standard function? I do not want to start in My Documents but will load the default path from a parameter I've stored successfully in the registry. This is a multi-template app depending on file extension, but for now all the files will be stored in one default folder. Nothing to set in the menu resource string tables for this?
-
I need to set the default file open folder for open file in a doc/view/mdi app. I know about the win32 api structure containing an initial folder parameter. The file is serialized. Do I have to completely subclass the dialog or is there a way to modify that structure variable capturing the menu message on File Open and then pass to the standard CFileOpen without rewriting all of it? Also, what module (MainFrame, ChildFrame, etc, do I capture the message and set the initial folder variable, then pass on to the standard function? I do not want to start in My Documents but will load the default path from a parameter I've stored successfully in the registry. This is a multi-template app depending on file extension, but for now all the files will be stored in one default folder. Nothing to set in the menu resource string tables for this?
After constructing your CFileDialog, just change the m_ofn member as appropriate before calling DoModal(). --Mike-- http://home.inreach.com/mdunn/
-
After constructing your CFileDialog, just change the m_ofn member as appropriate before calling DoModal(). --Mike-- http://home.inreach.com/mdunn/
but can I catch this in the framework without subclassing the entire file open? In the doc On Open? elsewhere in the wiz generated doc/view?
-
but can I catch this in the framework without subclassing the entire file open? In the doc On Open? elsewhere in the wiz generated doc/view?