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
}