ATL provides the capability to host controls in windows, dialogs, and other controls. Control containment under ATL is based on two new window classes, AtlAxWin80 and AtlAxWinLic80. As wrappers around these window classes, ATL provides the CAxWindow and CAxWindow2 classes, respectively. After a control hosting window has been created, it can be treated as a window, using the functionality of the CWindow base class. It can also be used as a COM object, using the interfaces available with the QueryControl member function of the CAxWindow class. The interfaces of the control can be used to sink events, persist the control's state, or program against the control's custom interfaces.

Many objects in ATL can make use of these window classes to host controls. Windows can use them manually via the CAxWindow class. Dialogs can use them automatically when using the CAxDialogImpl class. Controls can contain other controls in ATL when derived from CComCompositeControl. Finally, HTML controls can host the WebBrowser control, combining the best of the dialog resource declarative model and a full-featured COM UI framework model.

ATL Internals. Working with ATL 8
ATL Internals: Working with ATL 8 (2nd Edition)
ISBN: 0321159624
EAN: 2147483647
Year: 2004
Pages: 172 © 2008-2017.
If you may any questions please contact us: