CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    19

    Prevention of startup MDI child

    How can I prevent a creation of first startup MDI child window which is creating automatically after app run.
    or to add some code before creation of this child window.
    Thanx alot



  2. #2
    Join Date
    May 1999
    Location
    Jerusalem, Israel
    Posts
    251

    Re: Prevention of startup MDI child

    Put in InitInstance function of your application class following lines between ParseCommandLine() and ProcessShellCommand():

    CMyApp::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;
    ...
    }





    Jack Shainsky
    Jerusalem, Israel.
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured