Jump to content
  • Advertisement

Archived

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

phil05

Win32 API: How do I disable the max button?

This topic is 5211 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

Subject says all. Thanks. Also, I'm assuming this disallows the user to manually resize the window. Am I wrong? [edited by - philvaira on May 9, 2004 5:37:40 PM]

Share this post


Link to post
Share on other sites
Advertisement
Don''t include WS_EX_CLIENTEDGE in your extended window style. This disables the user from resizing. To get rid of the maximize button, add

& ~WS_MAXIMIZEBOX

or something, to your dwStyle flags.
What do you have in your dwStyle flags right now?

Share this post


Link to post
Share on other sites
If you are going to be doing any Win32 programming you should bookmark MSDN and refer to it religiously. It can be a little cumbersome to navigate but it is a great resource.

Anyway.

To get rid of that button you will need to specify what you want on the window in the Style parameter of CreateWindow() or CreateWindowEx(). You won''t be able to just specify WS_OVERLAPPEDWINDOW or WS_POPUP.

This page tells you what styles you can apply to a window.

You would probably want to use WS_CAPTION | WS_BORDER | WS_MINIMIZEBOX | WS_SYSMENU | WS_VISIBLE.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!