Changing window size trough code

Dec 24, 2012 at 2:56pm
Hi, I am new to Win32 programming so sorry if my question is silly.

I just learned how to use resources and create menus and I just wonder if its possible to change window size from menu. So what I am trying to do is to make a program which will have a drop down menu with bunch of window sizes and every time user choose one of them, the window will take that size. The problem is window is getting created in main and I have to write a code in WinProc, I just hope that I can call some function which will update window size.

Hope my question is understandable.
Thank you.
Dec 24, 2012 at 5:18pm
There are four coordinates in the MoveWindow() function, that will allow you to do exactly what you want. Just execute the function in response to the WM_COMMAND message for whatever menu selection.
Dec 24, 2012 at 5:19pm
I'm assuming this is WinAPI.

Sounds like you want MoveWindow

msdn reference:
http://msdn.microsoft.com/en-us/library/ms633534%28VS.85%29.aspx

Dec 25, 2012 at 4:30am
MoveWindow() is just what I was looking for, thank you guys.
Topic archived. No new replies allowed.