Hi Roland,
MoveWindow() works OK and definitely does what it is supposed to. But control movement will be more or less smooth and fast only if the number of controls to resize/reposition is relatively small.
If you have to resize/reposition a much larger number of dialog controls like e.g. a set of table cells in a single swoop, which isn't so uncommon in practice, then prefer to use a
BeginDeferWindowPos()/DeferWindowPos()/EndDeferWindowPos() API sequence.
Their cumulative effect and syntax are very similar to a series of
SetWindowPos() API calls but will occur in a
single redraw of the parent dialog window in response to the EndDeferWindowPos() call. Thus there will be much less dialog window flicker and resizing/repositioning will be much much faster and unnoticeable to the eye.
Note well that the above APIs will work only if each and every child control window in the batch to be moved belongs
directly to one and the same immediate parent -- in your case, to the main dialog window of your project. If at least one child window happens to have some other immediate parent (by mistake or in an attempt to cheat Windows), like e.g. a frame or tab page container control, then the entire sequence will fail and the child controls' positions and/or sizes will remain unchanged.