In both techniques, the calls to Create() results in the creation of a CAxHostWindow object. The call to CreateControl() or AttachControl() also creates another CAxHostWindow Object. Upon destruction, the CAxHostWindow object created by Create() is freed.
Use one of the techniques mentioned in article Q218442 to create ActiveX controls at run time.
This behavior is by design.
For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
192560 HOWTO: Adding ATL Control Containment Support to Any Window
218442 HOWTO: Programmatically Add ActiveX Controls to Composite Control