CAxWindow::CreateControlEx

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

At a Glance

Header file: Atlwin.h
Windows CE versions: 2.10 and later
Complete documentation: Visual C++ documentation

Syntax

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 );