|
-
May 29th, 2001, 05:15 PM
#1
Thread Starter
Fanatic Member
Maximizing windows
Hi, how can I prevent a window from being maximized or gray out the maximize button? If you need my code it is just the basic window from winprog.org.
Alcohol & calculus don't mix.
Never drink & derive.
-
May 29th, 2001, 05:37 PM
#2
Frenzied Member
I think this will prevent the maximizing of a window (not tested):
Code:
HMENU m = GetSystemMenu(hWnd, FALSE)
RemoveMenu m, SC_MAXIMIZE, MF_BYCOMMAND
Last edited by Vlatko; May 29th, 2001 at 05:42 PM.
-
May 29th, 2001, 07:24 PM
#3
Thread Starter
Fanatic Member
Well, that sort of works. The maximize button is clickable, but nothing happens when you click it. You can still resize the window by dragging, however.
Alcohol & calculus don't mix.
Never drink & derive.
-
May 29th, 2001, 10:12 PM
#4
Hyperactive Member
Here You Go.
In You CreateWindowEx Procedure, simply use the following in your dWstyle.
Code:
WS_OVERLAPPEDWINDOW - WS_MAXIMIZEBOX - WS_SIZEBOX
this creates a window that cannot be sized and a window that does not have its maximize button enabled.
-
May 30th, 2001, 11:08 AM
#5
Thread Starter
Fanatic Member
AAG, thanks a lot! That works perfectly.
Alcohol & calculus don't mix.
Never drink & derive.
-
May 31st, 2001, 06:21 AM
#6
Hyperactive Member
Sure :)
No Problem. Glad To Help
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|