How do I do that? I was thinking there would be an indentifier i put in place of: WS_OVERLAPPEDWINDOW, anyone know what it is?
How do I do that? I was thinking there would be an indentifier i put in place of: WS_OVERLAPPEDWINDOW, anyone know what it is?
Start with WS_POPUP | WS_CAPTION and add the styles as you wish ...
WS_MAXIMIZEBOX
WS_MINIMIZEBOX
WS_BORDER
WS_SYSMENU
........yadda yadda......
When your window is being resized it is sent a message. You can capture this message in your Window Procedure and then resize your window back to the way you want. You would have to use WM_SIZE or WM_SIZING. There is a way to make the maximize button so it cannot be clicked on. Using CreateWindow() you can use these styles:
- SeanWS_MAXIMIZE Creates a window that is initially maximized.
WS_MAXIMIZEBOX Creates a window that has a Maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.
WS_MINIMIZE Creates a window that is initially minimized. Same as the WS_ICONIC style.
WS_MINIMIZEBOX Creates a window that has a Minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified.
If cities were built like software is built, the first woodpecker to come along would level civilization.
Black Frog Studios
Thanks, ended up going with:
WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX
yeah that's pretty much what I use all the time, except that you don't need WS_CAPTION - I think it's included in WS_OVERLAPPED. If not, it's in one of the other ones
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Another way to stop your windows being resized is to catch the
WM_MOVING msg and replace its params. Put them back to the original.
I keep an array bout my apps windows. It holds HDC's, HWND's, ID's and rects.
So I just put the screen rect back into the msg param.
case WM_MOVING:
((RECT*)lParam)->left=rScreenRect.left;
//ect
break;
and let the default winproc take care of it.
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill