Changing window size trough code

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.
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.
I'm assuming this is WinAPI.

Sounds like you want MoveWindow

msdn reference:

MoveWindow() is just what I was looking for, thank you guys.
Topic archived. No new replies allowed.