Real easy Win32 question...

Started by
3 comments, last by Tire 24 years, 5 months ago
The CreateWindowEx or CreateWindow calls have a dwStyle parameter. This is a combination of flags for the style of the window. WS_MAXIMIZEBOX has to be in there for there to be a maximize box. If you are not putting it in there specifically, then you are using one of the flags that has it built in (like WS_OVERLAPPEDWINDOW or WS_TILEDWINDOW).

Please let me know via email if you need more help.

------------------

-Kentamanos

-Kentamanos
Advertisement
You can specify that in the dwStyle parameter that you pass to CreateWindow() or CreateWindowEx(). To get a nice window that is suitable for windowed games, I use: WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX

If you don't use the above, just make sure whatever you use does NOT include the WM_MAXIMIZEBOX, which tells CreateWindow to put a maximizing box on the window.

- Splat

Doh, seconds later than Kentamanos!

[This message has been edited by Splat (edited November 11, 1999).]

Also, if you want to use one of the easy predefined styles like WS_OVERLAPPED, you can add ~WS_MAXIMIZEBOX to your dwStyle parameter to take it out. (e.g. WS_OVERLAPPED | ~WS_MAXIMIZEBOX)

I think that works

Jonathan

What is the comand to create a window with the maximized button greyed out? The only thing I can find is the the CS_NOCLOSE flag for the wndclass.style field. It greys out the close button, but there is not anything to grey the maximzed button. I can not find it in Petzold or the Win32 SDK but I know its possible!
Close. That WM_OVERLAPPED | ~CS_MAXIMIZEBOX would not work, however. It needs to read WM_OVERLAPPED & ~CS_MAXIMIZEBOX. The OR will _set_ everything that is not maximizebox on, while the the AND will _leave_ everything except maximize as it was.

- Splat

This topic is closed to new replies.

Advertisement