Doc/View Questions
-
Hi everybody, when my doc/view app starts, the Framework does a call to OnNewDocument if no document is specified on the commandline. I would like to change this. What I'd like to do is to open a document. For this purpose I've created a dialog similar to the dialog that pops up if you start Visual Basic (provided you use the default config). The user can choose whether to open a recently used file, browse for a file or create a new file. How do I get started with this one? Any help is greatly appreceated. Matthias
-
Hi everybody, when my doc/view app starts, the Framework does a call to OnNewDocument if no document is specified on the commandline. I would like to change this. What I'd like to do is to open a document. For this purpose I've created a dialog similar to the dialog that pops up if you start Visual Basic (provided you use the default config). The user can choose whether to open a recently used file, browse for a file or create a new file. How do I get started with this one? Any help is greatly appreceated. Matthias
If mean you don't want the default document to load on startup, then this is the code:
// Parse command line for standard shell commands, DDE, file open CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); // ADD THIS LINE RIGHT HERE! ( AFTER the above lines!) cmdInfo.m\_nShellCommand = CCommandLineInfo::FileNothing;
Add it in the
InitInstance()
of your apps class, and then make your selection dialog load and prompt user to select whatever they wanted! :) "Socrates is a man. All men are mortal. Therefore Socrates is mortal." -- Aristotle (syllogism) Cheers Masoud Samimi Go!