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
    Location
    Bangalore, India
    Posts
    30

    Window Maximizing problems

    Env: Windows NT 4.0 SP3, VC++ 6.0

    Hi,

    I want my application to start in maximized window mode everytime. To do
    this, I use the following in my CWinApp derived class,

    m_pMainWnd->ShowWindow(SW_MAXIMIZE);

    *BUT*, the application first comes up in a small window and then resizes to
    fill the entire screen. Why is this happening ? Is there no way to display
    it in maximized mode in the first shot itself ?

    To test whether I'm doing something wrong, I created a new project and set
    the window state to Maximized using the AppWizard itself. I notice the same
    problem here as well.

    Does anyone know of a technique to display the app in full screen in the
    first shot itself?

    Thanks,



    With Regards,

    Anuj Seth

  2. #2
    Join Date
    May 1999
    Posts
    116

    Re: Window Maximizing problems

    You could try catching the PreCreateWindow for your mainframe and setting the initial size to be the full work area (You can get this by calling SystemParametersInfo with param SPI_GETWORKAREA). However, in this case you will have a normal window which takes up the full work area as opposed to a maximized window.


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