you know in the upper right hand corner of a window there is the minimize, maximze, and "x" button? well, i dont want the user to be able to maximize the window, so i should just gray out that button so it's not useable. how would i do this?
thanks!
This is a discussion on no maximize for the window within the Windows Programming forums, part of the Platform Specific Boards category; you know in the upper right hand corner of a window there is the minimize, maximze, and "x" button? well, ...
you know in the upper right hand corner of a window there is the minimize, maximze, and "x" button? well, i dont want the user to be able to maximize the window, so i should just gray out that button so it's not useable. how would i do this?
thanks!
It all just depends on the windows style that you choose for it. You might be using WS_OVERLAPPEDWINDOW. This style combines a bunch of other styles such as WS_MAXIMIZE and WS_MINIMIZE. Just go to MSDN then you can choose the styles you want.
http://msdn.microsoft.com
A problem that I've encountered with this is that even if you disable WS_MAXIMIZE you can still maximize the window using the system menu (right click the top left of the window). To prevent this, catch the WM_SIZE message and if it is ???_MAXIMIZED (something...) then shrink it again.
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
Yeah its SC_MAXIMIZE for System Command.