
MS-C++6.0: Starting without empty document
Look at the related help for ProcessShellCommand if you are using MSVC 6.0.
Following is the excerpts.
CCommandLineInfo::FileNothing Turns off the display of a new MDI child
window on startup. By design, AppWizard generated MDI applications display a
new child window on startup. To turn off this feature, an application can
use CCommandLineInfo::FileNothing as the shell command when calling
ProcessShellCommand. ProcessShellCommand is called by the InitInstance( ) of
all CWinApp derived classes.
Example
BOOL CMyWinApp::InitInstance()
{
...
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// DON'T display a new MDI child window during startup!!!
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
// Dispatch commands specified on the command line
if (!ProcessShellCommand(cmdInfo))
return FALSE;
...
Quote:
};
>Override OnopenDocument() and call the doc you want
>and not call Delete()
>>Hi,
>>I want my application to start WITHOUT an empty document.
>>What do I have to change in the standard MDI-Project created by the
>>applicationWizard ?
>>--------------> Raimund ---------------->