954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Window Doesn't Have Maximize Button

I'm using the Win32 API to create a game, and I want to give the player as big of a field of view as possible. The problem is, with the game engine I've developed (from Michael Morrison's Beginning Game Programming), I can minimize and close the program, but I can't maximize it. I also can't resize the window.
Is there a decent way for me to make that grayed-out maximize button regular, and be able to resize the window?
I didn't consider posting the source code of the WHOLE game engine (including .cpp and header files) important, but if it helps, I could.

Chuckleluck
Junior Poster in Training
54 posts since Sep 2011
Reputation Points: 10
Solved Threads: 1
 

Check the WM_CREATE switch statement in WinProc() to see if the buttons are greyed out there.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

What would the code to disable/enable the maximize button look like? All I have under WM_CREATE is:

case WM_CREATE:
      // Set the game window and start the game
      SetWindow(hWindow);
      GameStart(hWindow);
      return 0;
Chuckleluck
Junior Poster in Training
54 posts since Sep 2011
Reputation Points: 10
Solved Threads: 1
 

I don't do any windows programming, so I don't know the actual API call, but I do know that there is a window property that controls that. To activate the maximize button, the "MaximizeBox" property needs to be set to "True". If you have a window style definition, you may be able to do it in there.

Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: