CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  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.
    or to add some code before creation of this child window.
    Thanx alot



  2. #2

    Re: Prevention of startup MDI child

    Hey,

    You could add the following code in your application classes OnInitInstance overide, just before ProcessShellCommand:

    if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
    cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;



    This will determine if your app is starting with the new flag on the command line (default if you just start the app) and set the action to nothing. This should do what you want.

    Hope this helps,

    Simon


  3. #3
    Join Date
    May 1999
    Posts
    5

    Re: Prevention of startup MDI child

    you can even delete the lines in InitInstance()
    // CCommandLineInfo cmdInfo;
    // ParseCommandLine(cmdInfo);

    // Dispatch commands specified on the command line
    // if (!ProcessShellCommand(cmdInfo))
    // return FALSE;

    I was gone with my broken heart.

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