Const size window in Win32

Started by
4 comments, last by cMADsc 22 years, 3 months ago
How can I make the window so the user can not resize it? This is for my opengl game. Thanks in advance. ----------------------------- "There are ones that say they can and there are those who actually do." "...u can not learn programming in a class, you have to learn it on your own."
-----------------------------"There are ones that say they can and there are those who actually do.""...u can not learn programming in a class, you have to learn it on your own."
Advertisement
i believe you should capture the "WM_SIZE" command and do not pass it to the "DefWindowProc". not sure tho.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
the third parameter of CreateWindow() is the widow style, you should be able to OR in a flag here to do that.

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
When creating the window, simply make sure the window style doesn''t include WS_THICKFRAME. Styles that include it are WS_SIZEBOX and WS_OVERLAPPEDWINDOW. If you''re using a window with style WS_OVERLAPPEDWINDOW, try using ((WS_OVERLAPPEDWINDOW)& ~WS_THICKFRAME). This will still allow maximizing/minimizing, though. I think you''ll want to use WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU instead.

Kippesoep
I try not including WS_THICKFRAME this way:

WS_OVERLAPPEDWINDOW | ~WS_THICKFRAME,....

When the window appears and is not resizable but it is also not painted and seems not to respond either so I end up doing a
C-A-D to close the program. Anymore assistance is surely needed and appreciated!


-----------------------------
"There are ones that say they can and there are those who actually do."

"...u can not learn programming in a class, you have to learn it on your own."

-----------------------------"There are ones that say they can and there are those who actually do.""...u can not learn programming in a class, you have to learn it on your own."
notice that Kippesoep used & not | ... but:
WS_OVERLAPPEDWINDOW == WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX 

so you could just do it by hand:
WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX 

this leaves out the thickframe, if you don''t want min/max you can leave those out also.

--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

This topic is closed to new replies.

Advertisement