Chapter 30 -- ATL and ActiveX Controls

Chapter 30

If you've finished reading about COM and ATL and still wonder how COM fits into your day-to-day programming activities, you're not alone. Figuring out how to use COM in real life isn't always obvious at first glance. After all, a whole lot of extra code must be typed in just to get a COM object up and running. However, there's a very real application of COM right under your nose —ActiveX Controls. ActiveX controls are small gadgets (usually UI-oriented) written around the Component Object Model.

In Chapter 29, you examined COM classes created by using ATL. In this chapter, you'll learn how to write a certain kind of COM class—an ActiveX control. You had a chance to work with ActiveX Controls from the client side in Chapter 8. Now it's time to write your own.

There are several steps involved in creating an ActiveX control using ATL, including:

  • Deciding what to draw

  • Developing incoming interfaces for the control

  • Developing outgoing interfaces (events) for the control

  • Implementing a persistence mechanism for the control

  • Providing a user interface for manipulating the control's properties

This chapter covers all these steps. Soon you'll be able to use ATL to create ActiveX controls that you (or other developers) can use within other programs.



Programming Visual C++
Advanced 3ds max 5 Modeling & Animating
ISBN: 1572318570
EAN: 2147483647
Year: 1997
Pages: 331
Authors: Boris Kulagin

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net