Summary
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.
|