Archived

This topic is now archived and is closed to further replies.

cMADsc

Const size window in Win32

Recommended Posts

cMADsc    122
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."

Share this post


Link to post
Share on other sites
jenova    122
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.

Share this post


Link to post
Share on other sites
Kippesoep    892
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.

Share this post


Link to post
Share on other sites
cMADsc    122
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."

Share this post


Link to post
Share on other sites
krez    443
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)

Share this post


Link to post
Share on other sites