|
-
October 1st, 1999, 01:49 PM
#1
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
-
October 1st, 1999, 08:50 PM
#2
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
-
October 2nd, 1999, 06:04 AM
#3
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|