Often time I need to add a control to a dialog after the dialog has been generated via dialog template and CreateDialogIndirect. In these cases the tab order is set by the dialog template and there is no obvious way to change the tab order by including a newly created control.
This works well. There's an MFC equivalent in CWnd: newControl.SetWindowPos(oldControl, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
The question very clearly says that it can't be done at design time.