Open doesn't use initial child view.
I'm using Visual C++, MFC with an MDI format. When the program first runs, of course, an initial child-window opens up. If I immediately try to load a document (through OPEN FILE, for instance) that initial child-window is not used and just sits there. How can I get my program to act like Word, for example, where that initial blank document is replaced?
Thanks,
John
Re: Open doesn't use initial child view.
If the app has a pointer to the doc you could call OnCloseDocument()in the function that opens up the document you want. Or you could not open a new document when your app starts by modifying InitInstance()after the declaration:
CCommandLineInfo cmdInfo;
insert:
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
Hope this helps!
Steve Stofka
Steve Stofka
Re: Open doesn't use initial child view.
I think you can find many useful hints from the article:
http://www.codeguru.com/doc_view/ope..._recent2.shtml
Regards
Peter