Archived

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

tototam

resize Windows

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