Thread: Maximizing the window

  1. #1
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728

    Maximizing the window

    Okay, last stupid question - I hope!

    How do I make it so upon creation my window is maximized already? I looked in winuser.h and found the style WS_MAXIMIZE but it didn't seem to do anything. Does one have to call a function to get the screen size and then use these values as the 6th and 7th parameters in CreateWindow()?

  2. #2
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Try ShowWindow(hWnd, SW_MAXIMIZE)
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  3. #3
    Cheesy Poofs! PJYelton's Avatar
    Join Date
    Sep 2002
    Location
    Boulder
    Posts
    1,728
    Thanks, that worked!

  4. #4
    Registered User
    Join Date
    Jun 2003
    Posts
    70
    Are you creating application in VC++ using MFC app wizard ?
    Chintan R Naik

  5. #5
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Dunno, if he was he probably wouldnt be looking in winuser.h for the styles, he'd just be clicking the checkbox in the resource editor.

    *Also, just thought of something. I think WS_MAXIMIZE just enables the maximize box on the system menu, so it isn't grayed out.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  2. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 11:06 AM
  3. My Window Class
    By Epo in forum Game Programming
    Replies: 2
    Last Post: 07-10-2005, 02:33 PM
  4. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  5. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM