Hello all :bg I'm new to assembler and I've created a dialog box :U Only problem is that when I resize the window all the controls stay in there spot. They don't reposition them selves to the window. Is there a specific win32 api I can use in my window procedure? Thanks
Yes but its not as easy as you think. You can use MoveWindow() or SetWindowPos() but you must track and size the windows yourself. You get the size with API calls like GetClientRect() or GetWindowRect() depending on what you need, calculate the size change then use MoveWindow() to change the size.
There are no API calls that automatically resize controls in a dialog or window.
great idea.
[attachment deleted by admin]
Wow :green2 Good info. I was hoping for an easier way but I guess I got some reading to do. Thanks Hutch :clap:
Unless there is a reason to allow the user to resize a window, I eliminate that possibility with window style settings. I usually just allow minimizing.
Boooo. One of my pet peeves is not being able to resize a window or popup or anything else!
> There are no API calls that automatically resize controls in a dialog or window
But we haveĀ DeferWindowPos / BeginDeferWindowPos / EndDeferWindowPos
DeferWindowPos is used to reduce the amount of work the system does in moving/resizing multiple windows. The new position and size must still be determined and passed to the function.
http://blogs.msdn.com/oldnewthing/archive/2005/07/06/436043.aspx