Share via


AtlAxAttachControl

 

Attaches a previously created control to the specified window.

Important

This function cannot be used in applications that execute in the Windows Runtime.

Syntax

      ATLAPI AtlAxAttachControl(
IUnknown* pControl,
HWND hWnd,
IUnknown** ppUnkContainer 
);

Parameters

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

  • hWnd
    [in] Handle to the window that will host the control.

  • ppUnkContainer
    [out] A pointer to a pointer to the IUnknown of the container object.

Return Value

One of the standard HRESULT values.

Remarks

Use AtlAxCreateControlEx and AtlAxCreateControl to simultaneously create and attach a control.

Note

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

Requirements

Header: atlhost.h

See Also

ATL Composite Control Fundamentals