Thread: Prevent Window from being resized?

  1. #1
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212

    Question Prevent Window from being resized?

    When you create a window...
    Code:
    hwnd = CreateWindowEx(
            WS_EX_CLIENTEDGE,
            g_szClassName,
            "weee.",
            WS_OVERLAPPEDWINDOW,
            CW_USEDEFAULT, CW_USEDEFAULT, 580, 50,
            NULL, NULL, hInstance, NULL);
    How do you stop people resizing it? [apart from removing their fingers with a knife]

  2. #2
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,212
    Dont worry, im using
    WS_SYSMENU

    God bless the board search.

  3. #3
    Registered User xds4lx's Avatar
    Join Date
    Nov 2001
    Posts
    630
    A pretty straigtforward and easy to use method using CreateWindowEx is combine the window styles WS_OVERLAPPED and WS_SYSMENU, make sure you dont use the WS_OVERLAPPEDWINDOW
    "only two things are infinite, the universe and human stupidity, and im not sure about the former." - albert einstein

  4. #4
    the Corvetter
    Join Date
    Sep 2001
    Posts
    1,584
    And if you want to keep the minimize box just use WS_MINIMIZEBOX also. Just a side note
    1978 Silver Anniversary Corvette

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. OpenGL Window
    By Morgul in forum Game Programming
    Replies: 1
    Last Post: 05-15-2005, 12:34 PM
  4. problem with open gl engine.
    By gell10 in forum Game Programming
    Replies: 1
    Last Post: 08-21-2003, 04:10 AM
  5. opengl code not working
    By Unregistered in forum Windows Programming
    Replies: 4
    Last Post: 02-14-2002, 10:01 PM