CAxWindow::CreateControlEx

HRESULT CreateControlEx( LPCOLESTR lpszName, IStream* pStream = NULL, IUnknown** ppUnkContainer = NULL, IUnknown** ppUnkControl = NULL, REFIID iidSink = IID_NULL, IUnknown* punkSink = NULL );

HRESULT CreateControlEx( DWORD dwResID,  IStream* pStream = NULL, IUnknown** ppUnkContainer = NULL, IUnknown** ppUnkControl = NULL, REFIID iidSink = IID_NULL, IUnknown* punkSink = NULL );

Return Value

A standard HRESULT value.

Parameters

lpszName

A pointer to a string to create the control. Must be formatted in one of the following ways:

pStream

[in] A pointer to a stream that is used to initialize the properties of the control. Can be NULL.

ppUnkContainer

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

ppUnkControl

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

dwResID

The resource ID of an HTML resource. The WebBrowser control will be created and loaded with the specified resource.

Remarks

Creates an ActiveX control, initializes it, and hosts it in the specified window. Use this function, instead of CreateControl, to retrieve interface pointers from the newly created control.

CAxWindow OverviewClass Members

See Also

AtlAxCreateControlEx