CAxWindow::CreateControl

HRESULT CreateControl( LPCOLESTR lpszName, IStream* pStream = NULL, IUnknown** ppUnkContainer = NULL );

HRESULT CreateControl( DWORD dwResID, IStream* pStream = NULL, IUnknown** ppUnkContainer = 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.

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. If the second version of this function is used, an HTML control is created and bound to the resource identified by dwResID.

This method gives you the same result as calling CreateControlEx( lpszName, hWnd, pStream, NULL, NULL, NULL, NULL );.

CAxWindow OverviewClass Members

See Also

AtlAxCreateControl