Microsoft MVP [VC], MCSD
MVP VC FAQ: http://www.yqcomputer.com/
So far so good.
Detach causes the interface pointers, hence the COM objects, to be
leaked. Don't call Detach - call .Release (not ->Release) to dispose
of your references.
Are these ActiveX Controls? In that case you need to host them as
well, using CAxWindow. See the following KB article:
Q218442: "How to add ActiveX controls to an ATL composite control
programmatically in Visual C++"