[MFC] Cum pornesc o aplicatie MDI fara fereastra MDI child?

Despre MFC, ATL si alte biblioteci C++ de la Microsoft (forum moderat)
Post Reply
User avatar
Ovidiu Cucu
Fondator
Fondator
Posts: 3778
Joined: 11 Jul 2007, 16:10
Judet: Iaşi
Location: Iasi
Contact:

[MFC] Cum pornesc o aplicatie MDI fara fereastra MDI child?

Post by Ovidiu Cucu » 21 Apr 2011, 13:53

Q: Cum pornesc o aplicatie MDI fara fereastra MDI child?

A: Cel mai simplu, in InitInstance atribui valoarea CCommandLineInfo::FileNothing lui cmdInfo.m_nShellCommand.

Code: Select all

BOOL CMyMDIApp::InitInstance()
{
// ...
   // Parse command line for standard shell commands, DDE, file open
   CCommandLineInfo cmdInfo;
   ParseCommandLine(cmdInfo);
   cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; // <-- add this!

   // Dispatch commands specified on the command line
   if (!ProcessShellCommand(cmdInfo))
// ...
}
<< Back to MFC index



Post Reply