Archived

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

resize Windows

This topic is 4955 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

the windows application always set to be "can resize", but how can i set my windows application to be "cannot resize"? set which option ? my window creation is the following: hwnd=CreateWindow("GAMECLASS","GAME",WS_MAXIMIZE|WS_OVERLAPPEDWINDOW,0,0, 400,400,NULL,NULL,hinst,NULL); tototam

Share this post


Link to post
Share on other sites
Sorry , i can''t help !i have used the function SetWindowPos(g_hwnd,HWND_TOPMOST,0,0,640,480,SWP_NOMOVE|SWP_NOSIZE);

but it can''t set no re size!
can you tell me further!

tototam

Share this post


Link to post
Share on other sites
try this:

hwnd = ::CreateWindow("GAMECLASS", "GAME", WS_OVERLAPPED | WS_VISIBLE | WS_SYSMENU | WS_MINIMIZEBOX, 0, 0, 400, 400, NULL, NULL, hinst, NULL);

That should give you a window of 400x400 which cant be resized and doesnt have the maximize button on the top.


-----------------------------------------------------
What do you call people who are afraid of Santa Claus? Claustrophobic!

Share this post


Link to post
Share on other sites
You really need to learn how to use MSDN...

WS_OVERLAPPEDWINDOW is a bitwise packing of different window options into one macro that allows a minimize/maximize box and resizing etc all with one macro. Therefore, if you don't want to maximize, then just use WS_OVERLAPPED as the style and not WS_OVERLAPPEDWINDOW. Be aware that just using that may not give you an X button in the corner or minimize box. If you bitwise 'OR' with WS_MINIMIZEBOX then you should have the minimize button as well as the X button..

[edited by - nervo on May 19, 2004 1:14:09 PM]

Share this post


Link to post
Share on other sites