Disabling window resizing?

Started by
3 comments, last by Anarcrothe 21 years, 6 months ago
Anyone know how to keep the user from resizing or maximizing a Win32 window? It seems like it ought to be a trivial thing, but I can''t find anything about it in the MSDN docs, and google hasn''t turned up anything, so I thought I''d ask you fine folks.
Advertisement
How are you creating the window? Look up CreateWindow(Ex).
You need to specify how you want the basic window to work by setting the appropriate styles.
For example:
WS_BORDER | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX

pan narrans
Study + Hard Work + Loud Profanity = Good Code
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
Specify ~WS_THICKFRAME as part of your window style:

WS_OVERLAPPEDWINDOW & ~WS_THICKFRAME
Yes, I''m using CreateWindowEx(). Thanks for the tips! I''m currently at work, so I''ll try them as soon as I get home.
OR!

Add a message handler for WM_GETMINMAXINFO and set the max and min size of your window there.
daerid@gmail.com

This topic is closed to new replies.

Advertisement