no maximize for the window

This is a discussion on no maximize for the window within the Windows Programming forums, part of the Platform Specific Boards category; you know in the upper right hand corner of a window there is the minimize, maximze, and "x" button? well, ...

  1. #1
    Registered User
    Join Date
    Nov 2002
    Posts
    157

    no maximize for the window

    you know in the upper right hand corner of a window there is the minimize, maximze, and "x" button? well, i dont want the user to be able to maximize the window, so i should just gray out that button so it's not useable. how would i do this?

    thanks!

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    It all just depends on the windows style that you choose for it. You might be using WS_OVERLAPPEDWINDOW. This style combines a bunch of other styles such as WS_MAXIMIZE and WS_MINIMIZE. Just go to MSDN then you can choose the styles you want.

    http://msdn.microsoft.com

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    A problem that I've encountered with this is that even if you disable WS_MAXIMIZE you can still maximize the window using the system menu (right click the top left of the window). To prevent this, catch the WM_SIZE message and if it is ???_MAXIMIZED (something...) then shrink it again.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Yeah its SC_MAXIMIZE for System Command.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Just starting Windows Programming, School me!
    By Shamino in forum Windows Programming
    Replies: 17
    Last Post: 02-22-2008, 07:14 AM
  2. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  3. 6 measly errors
    By beene in forum Game Programming
    Replies: 11
    Last Post: 11-14-2006, 10:06 AM
  4. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  5. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21