ActiveX controls use much of the functionality discussed so far. An ATL-based control typically supports properties and methods using ATL's IDispatchImpl support. In addition, a control typically fires events; therefore, it often derives from IConnectionPointContainerImpl and uses a connection point proxy-generated class (IconnectionPointImpl derived) for each connection point. A control generally requires persistence support, so it uses one or more of the persistence-implementation classes: IPersistSrteamInitImpl, IPersistPropertyBagImpl, and IPersistStorageImpl.
In addition, many controls should implement numerous other interfaces so that they integrate well with various control containers, such as Visual Basic. In the next chapter, you learn how ATL supports hosting ActiveX controls, and how to write a control container using ATL.