Link to home
Start Free TrialLog in
Avatar of sa9813
sa9813

asked on

How to make window not resizable?

Using C to create a window, how to make the window not resizable? I'm registring a class and then use CreateWindow to create the window.
Avatar of Billy_Pilgrim
Billy_Pilgrim

hey - i don't know the answer, but if you can't find one:

try when you get a resize message to set the size back to what it was. . .

although to the user it will look a little ugly.  the window will resize then snap back.
ASKER CERTIFIED SOLUTION
Avatar of AlexVirochovsky
AlexVirochovsky

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Alex, WS_POPUP has nothing to do with it.  (Well, it is true if that is the ONLY style you use, then it won't be resizable, but  doubt that will be the only style.)

You need to specify a window style that does not include the WS_THICKFRAME style.  The WS_THICKFRAME lets the window be resized by the mouse.  You also probably don't want the WS_MAXIMIZEBOX and WS_MINIMIZEBOX styles which allow the window to be minimized and maximized.
sa9813, did alex's answer work for you?  That is the answer you accepted.
Avatar of sa9813

ASKER

No, not exactly but it sure got me on the right track! Thank you for giving me the extra information...Was it wrong of me to give Alex the points? I just had to add WS_POPUPWINDOW instead of WS_POPUP...just tell me if you would like any points I have got alot of questions, I sure am a newbie!
If it helped you that's good.  To me it seemed like the wrong answer--which would not be typical from Alex.  I guess it depends on how you interpret it.

I just don't like to see the wrong answer being accepted, the point system is a large point of what makes the site work.  But it sounds like it really wasn't the wrong answer, at least not as far as you are concerned (which is all that matters).