How to prevent an MDI application to open a new document at startup?

If you run an MDI application you would see a new empty document opened when you run the application. We can prevent the application to open such empty document by making a simple change in InitInstance( ) function as shown below:

BOOL CNoemptydocApp::InitInstance( )

{

// AppWizard generated code

CCommandLineInfo cmdInfo ;

cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing ;

ParseCommandLine ( cmdInfo ) ;

// AppWizard generated code

}

Subscribe / Share

It's very calm over here, why not leave a comment?

Leave a Reply




Categories

Powered by Yahoo! Answers