Handling window size at startup


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.

Who is Participating?
AndyAinscowFreelance programmer / ConsultantCommented:
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

      return TRUE;
osi-sysAuthor Commented:
Thanks AndyAinscow...my problem is solved...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.