Click here to Skip to main content
15,887,895 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to create a window that acts like "normal" one, but without maximize button, and sizing border.

Searching through Internet, and studying MSDN, I have learned that natively achieving both is impossible.

There is no window style that does both ( I can disable maximize button, but that is not my aim; as for removing resizing options, I have found suitable window styles in the documentation ).

The closest description would be the dialogbox frame behavior ( no sizing border ), but with extra minimize button.

QUESTION:

Is there a way to achieve my goal some other way?

If yes, can you please provide links to tutorials or code examples? This would be the first time for me to do such a thing and could use all the help I could get?

An important note: I have found this[^] example while searching for a solution, but it will not help me because I target Windows XP onwards.
Posted

1 solution

Searching through Internet, and studying MSDN, I have learned that natively achieving both is impossible.
Not true at all, just use WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_DLGFRAME | WS_MINIMIZEBOX styles in your CreateWindow or CreateWindowEx call.
 
Share this answer
 
Comments
AlwaysLearningNewStuff 10-Dec-14 13:15pm    
The point is to completely remove the maximize box, not to disable it... Thank you for answering though.
Richard MacCutchan 11-Dec-14 3:51am    
See http://msdn.microsoft.com/en-gb/library/windows/desktop/ms632600%28v=vs.85%29.aspx. You can try playing with different combinations, but I have not found one that will do what you want.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900