Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Handling window size at startup

Hi

I am working in MFC with a SDI application. When the executable is executed from windows explorer by double clicking on it, it gets restore notification and the window appears in RESTORE mode. I want to change this default option, I want it to be in maximized mode for the very first time when it's run.
I don't want to handle in OnSize() handler.

Can any one pls help me in changing this option.

Thanks
Madhavi.
0
osi-sys
Asked:
osi-sys
1 Solution
 
AndyAinscowCommented:
in the OnInitInstance of the app

      // The one and only window has been initialized, so show and update it.
      //m_pMainWnd->ShowWindow(SW_SHOW);  //This is default
      m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);  //*****************Display as maximised window
      m_pMainWnd->UpdateWindow();

      return TRUE;
}
0
 
osi-sysAuthor Commented:
Thanks AndyAinscow...my problem is solved...
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now