• Advertisement

Archived

This topic is now archived and is closed to further replies.

Real easy Win32 question...

This topic is 6741 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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).]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement