Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize


Attaches a previously created control to the specified window.

Important note Important

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

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


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


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


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

One of the standard HRESULT values.

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

Note Note

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

Header: atlhost.h

© 2015 Microsoft