IAxWinHostWindow::CreateControlEx

STDMETHOD( CreateControlEx )( LPCOLESTR lpszTricsData, HWND hWnd, IStream* pStream, IUnknown** ppUnk, REFIID iidAdvise, IUnknown* punkSink );

Return Value

A standard HRESULT value.

Parameters

lpTricsData

[in] A string identifying the control to create. Can be a CLSID (must include the braces), ProgID, URL, or raw HTML (prefixed with MSHTML:).

hWnd

[in] A handle to the window to be used for hosting.

pStream

[in] An interface pointer for a stream containing initialization data for the control. Can be NULL.

ppUnk

[out] The address of a pointer that will receive the IUnknown interface of the created control. Can be NULL.

iidAdvise

[in] The interface identifier of an outgoing interface on the contained object. Can be IID_NULL.

punkSink

[in] A pointer to the IUnknown interface of the sink object to be connected to the connection point on the contained object specified by iidSink.

Remarks

Creates an ActiveX control, initializes it, and hosts it in the specified window, similar to IAxWinHostWindow::CreateControl. Unlike that method, CreateControlEx also allows you to receive an interface pointer to the newly created control and set up an event sink to receive events fired by the control.

IAxWinHostWindow OverviewClass Members

See Also

IAxWinHostWindow::CreateControl, IAxWinHostWindow::AttachControl, CAxWindow::CreateControlEx, AtlAxCreateControlEx