I can't seem to figure out what I need to do to add an ActiveX control to an MFC window (like CDialog) at runtime.

It must be possible since you can add one to a dialog template and you only have to add one line of code to InitInstance (AfxEnableControlContainer(). So somebody, MFC or Window's, knows how to do it.