CAxWindow::AttachControl

Creates a new host object if one isn't already present and attaches the specified control to the host.

HRESULT AttachControl( 
   IUnknown* pControl, 
   IUnknown** ppUnkContainer  
);

Parameters

  • pControl
    [in] A pointer to the IUnknown of the control.

  • ppUnkContainer
    [out] A pointer to the IUnknown of the host (the AxWin object).

Return Value

A standard HRESULT value.

Remarks

The control object being attached must be correctly initialized before calling AttachControl.

Requirements

Header: atlwin.h

See Also

Reference

CAxWindow Class

AtlAxAttachControl