How can i create new document without first view?(in MDI mode)
Printable View
How can i create new document without first view?(in MDI mode)
Do you mean you want to get rid of the empty document that comes up when you first start your MDI app? If yes, then insert this between ParseCommandLine() and ProcessShellCommand() in your InitInstance():
//
// The mfc wizard causes the application to open a new
// document at startup. We don't want this behavior.
//
if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
and if it is a document created but without a view, try debugging the OnFileNew function by stepping into it, you'll find how.
Thank you!