How do i disable maximize?

This is a discussion on How do i disable maximize? within the Windows Programming forums, part of the Platform Specific Boards category; *topic* preferencially using WNDCLASSEX "style" argument (like CS_NOCLOSE) Thanks. --EDIT-- Answer: http://cboard.cprogramming.com/showthread.php?t=64492...

  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    57

    How do i disable maximize?

    *topic* preferencially using WNDCLASSEX "style" argument (like CS_NOCLOSE)
    Thanks.

    --EDIT--
    Answer: Disableing the "resize" function on a window
    Last edited by Tropicalia; 10-01-2006 at 09:59 AM.

  2. #2
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    Disabling maximize and resizing:
    Code:
    WS_OVERLAPPEDWINDOW & ~(WS_THICKFRAME|WS_MAXIMIZEBOX)
    As the window style.
    Or make a window not resizeable after creating it:
    Code:
    DWORD dwStyle = GetWindowLong(hwnd, GWL_STYLE);
    dwStyle &= ~(WS_MAXIMIZEBOX|WS_MINIMIZEBOX);
    SetWindowLong(hwnd, GWL_STYLE, dwStyle);
    Where hwnd is the window handle.
    Last edited by maxorator; 10-01-2006 at 11:08 AM.
    "The Internet treats censorship as damage and routes around it." - John Gilmore

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Disable specific warning?
    By DrSnuggles in forum C++ Programming
    Replies: 8
    Last Post: 05-07-2009, 10:45 PM
  2. Disable ALT key commands
    By Lionmane in forum Windows Programming
    Replies: 9
    Last Post: 09-23-2005, 10:41 AM
  3. Disable menu items.
    By Bajanine in forum Windows Programming
    Replies: 4
    Last Post: 05-14-2004, 09:48 AM
  4. Maximize All...
    By DeepBlackMagic in forum Tech Board
    Replies: 2
    Last Post: 09-01-2003, 07:05 PM
  5. Disable Resize Window :: MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 04-07-2002, 07:26 PM

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