ActiveX controls are a great testament to the power of COM. Through the rules of COM (specifically, the enforcement of standard interfaces and the magic of QueryInterface), it's possible to develop a rich user interface architecture, such as that of ActiveX controls.
Remember that it takes a whole lot of code to get an ActiveX control up and running. Specifically, the control needs to implement a host of interfaces, many of which are implemented the same way from one control to another. ATL is useful because it includes most of that boilerplate code in the form of already implemented interfaces. You just need to bring in the right interfaces and you're set.
In this chapter, we took a high-level view of ActiveX controls. ActiveX controls are COM objects that usually implement a user interface component. ActiveX controls maintain an internal state controlled by properties that can be persisted and a visual state represented by the way it renders the control. ATL provides a framework with all the hooks necessary to create COM objects that qualify as ActiveX controls. We'll revisit ActiveX controls from the client side when we look at using ActiveX controls within different development environments in Chapter 13.
In Chapter 11, we'll examine the COM persistence model and you'll find out how ATL implements persistence using property maps.