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...
Printable View
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...
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
Hi Roger,
Thanks this will work. It's not an application that can use command lines
or shell type parameters.
Thanks,
Paul...
In InitInstance(), you can find
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
Replace it with
CCommandLineInfo cmdInfo;
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
ParseCommandLine(cmdInfo);