|
-
October 21st, 1999, 10:01 AM
#1
How to prevent document creation when MDI app starts
Hi,
It's been a while since I've done this and it seems that MFC has now hidden this functionality. When an MDI app starts, by default, it also opens up an empty document. How does one prevent the empty document from being created?
Thanks,
Paul...
-
October 21st, 1999, 10:14 AM
#2
Re: How to prevent document creation when MDI app starts
The document gets created in the call :
if (!ProcessShellCommand(cmdInfo))
return FALSE ;
in the init instance of you App class. The only way I could get around this was to comment out these two lines, but then I didn't look into it too deeply.
Roger Allen
Q2 - [CB]RIGamortis
ICQ - 31764540
Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
Please remember to rate useful answers. It lets us know when a question has been answered.
-
October 21st, 1999, 10:35 AM
#3
Re: How to prevent document creation when MDI app starts
Hi Roger,
Thanks this will work. It's not an application that can use command lines
or shell type parameters.
Thanks,
Paul...
-
October 28th, 1999, 12:07 AM
#4
Re: How to prevent document creation when MDI app starts
In InitInstance(), you can find
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
Replace it with
CCommandLineInfo cmdInfo;
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
ParseCommandLine(cmdInfo);
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
|