Advertisement

Have the window not resizable and centered?

Started by March 31, 2007 01:35 PM
3 comments, last by ajm113 17 years, 10 months ago
I am using the code off of Nehe's website on the window tutoiral and I want to know how I can center the window and not have it be resizable in OpenGL. I think I mite have a clue what it mite look like but I am not sure. I also program in other languages also...
Check out my open source code projects/libraries! My Homepage You may learn something.
In order to disable sizing you must change the window style to:

WS_OVERLAPPEDWINDOW - WS_THICKFRAME

WS_THICKFRAME is the part that makes a window resizable.
.sehkteeah erthyahr gahro
Advertisement
Cool, thanks. :) Also what is the setting to hide the button on the window that makes the window fit your screen?
Check out my open source code projects/libraries! My Homepage You may learn something.
if you want to remover all the min/max/close buttons use

WS_OVERLAPEDWINDOWS - WS_THICKFRAME - WS_SYSMENU;


if you just want to remove the maximize button then you would use

WS_OVERLAPEDWINDOWS - WS_THICKFRAME - WS_MAXIMIZEBOX;


or your could always just use WS_POPUP wich would remove all frame around the window.
Cool, now I see. Looks simple enough.

Ah so this must be what I use to hide the minimize button.
WS_MINIMIZEBOX

Thanks!
Check out my open source code projects/libraries! My Homepage You may learn something.

This topic is closed to new replies.

Advertisement