- Table of Contents
- Copyright
- About the Authors
- About the Contributors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- How to Use This Book
- What You Need to Use This Book
- What's New in Visual C++ 6.0
- Contacting the Main Author
- Part I: Introduction
- Chapter 1. The Visual C++ 6.0 Environment
- Part II: MFC Programming
- Chapter 2. MFC Class Library Overview
- Chapter 3. MFC Message Handling Mechanism
- Chapter 4. The Document View Architecture
- Chapter 5. Creating and Using Dialog Boxes
- Chapter 6. Working with Device Contexts and GDI Objects
- Chapter 7. Creating and Using Property Sheets
- Chapter 8. Working with the File System
- Chapter 9. Using Serialization with File and Archive Objects
- Part III: Internet Programming with MFC
- Chapter 10. MFC and the Internet Server API (ISAPI)
- Chapter 11. The WinInet API
- Chapter 12. MFC HTML Support
- Part IV: Advanced Programming Topics
- Chapter 13. Using the Standard C++ Library
- Chapter 14. Error Detection and Exception Handling Techniques
- Chapter 15. Debugging and Profiling Strategies
- Chapter 16. Multithreading
- Chapter 17. Using Scripting and Other Tools to Automate the Visual C++ IDE
- Part V: Database Programming
- Chapter 18. Creating Custom AppWizards
- Chapter 19. Database Overview
- Chapter 20. ODBC Programming
- Chapter 21. MFC Database Classes
- Chapter 22. Using OLE DB
- Chapter 23. Programming with ADO
- Part VI: MFC Support for COM and ActiveX
- Chapter 24. Overview of COM and Active Technologies
- Chapter 25. Active Documents
- Chapter 26. Active Containers
- Chapter 27. Active Servers
- Chapter 28. ActiveX Controls
- Part VII: Using the Active Template Library
- Chapter 29. ATL Architecture
- Chapter 30. Creating COM Objects Using ATL
- Chapter 31. Creating ActiveX Controls Using ATL
- Chapter 32. Using ATL to Create MTS and COM+ Components
- Part VIII: Finishing Touches
- Chapter 33. Adding Windows Help
- Part IX: Appendix
A Short History
The term control, or custom control, has been around since Windows 3.0, when it was first defined. In fact, a custom control is nothing more than a dynamic link library (DLL) that exports a defined set of functions. Unlike a DLL, a custom control can manipulate properties and handle the firing of events in response to user or programmatic input. Custom controls were written in the C programming language and were used primarily by programmers writing their applications using C.
Shortly after C developers began using custom controls, the Visual Basic development environment caught on in the development community. Custom controls were necessary because developers found they needed better ways to express the user interface of their applications. Many times, there was simply no way to perform a complex operation in Visual Basic and reflect it in a meaningful way to the end user. As a result, the custom control came to be used in Visual Basic. Unfortunately—or fortunately, depending on your perspective—these C DLLs had no way of allowing Visual Basic to query the control for information on the properties and methods supported by the control. This inability made custom controls difficult to use in the Visual Basic development environment. Developers experienced great difficulty exporting the functions of the custom control to Visual Basic.
In 1991, Microsoft unveiled the Visual Basic Extension (VBX). The idea was that these reusable software components could be embedded in their container applications. To everyone's surprise, VBXs took off like wildfire. Companies cropped up all over the place developing these little reusable software components. VBXs provided a wide range of functionality, from a simple text label to a complex multimedia or communications control. VBXs were written in C and C++ and provided a wide variety of capabilities that would not have been possible in a Visual Basic application otherwise. VBXs became extremely popular.
Demand for VBXs grew within the developer market. Soon, Windows NT was released, and developers wanted VBXs for 32-bit applications and even non-Intel platforms, such as the DEC Alpha, RISC, Power PC, and MIPS. Developers wanted to extend VBXs by using Visual Basic for Applications to connect VBXs with applications such as Access, PowerPoint, Excel, Project, and Word.
Unfortunately, VBXs were severely restricted. They were built on a 16-bit architecture that is not designed as an open interface. They were primarily designed to accommodate the Visual Basic environment. This design made VBXs almost impossible to port to a 32-bit environment.
In 1993, OLE 2.0 was released. Shortly after the release of OLE 2.0, Microsoft extended the OLE architecture to include OLE controls. OLE controls, unlike their predecessors, the VBX and the custom control, are founded on a binary standard called the Component Object Model (COM). In addition, OLE controls support both 16- and 32-bit architectures.
Instead of creating an extended architecture for VBXs, Microsoft decided to develop OLE controls to offer the benefits of component architecture to a wider variety of development environments and development tools. The COM and OLE are open architectures, giving them a wider variety of input from the industry. Like their predecessor the VBX, OLE controls also are known by their file extension, OCX, and they likewise took the market by storm.
From 1993 to 1995, OLE controls flourished. Many independent software vendors (ISVs) converted their VBXs to OLE controls and in some cases maintained three versions: VBX, 16-bit OCX, and 32-bit OCX. The makers of Visual C++ and MFC created the OLE Control Developer's Kit and even incorporated it into Visual C++ 2.0 and 1.5, further adding to the success of OLE custom controls.
From 1995 to 1996, the Internet took the world by storm, causing Internet mania. Everyone had to become Web enabled. Companies began creating Web sites because they saw the Internet as the great advertisement media for the year 2000 and beyond. Since then, this trend has continued. Unfortunately, in previous years, the Internet had been a relatively static environment—due in part to the Internet's roots with the big-iron diehards who grew up with the IBM mainframes, VAXs, and UNIX boxes (the "dummy terminal" era). However, PC computers have become household devices for almost everyone. Users have become accustomed to graphical interaction with their machines, thanks to the Macintosh, Microsoft Windows, and X-Windows/Motif. In addition, thanks to Sun Microsystems and its invention of the Java programming language and the Java applet, the Internet is no longer a static environment. The days of static Web pages are gone. Now, Web pages have exploded to life with multimedia, sound, and dynamic interaction.
Realizing the potential and the hype surrounding the Internet explosion, Microsoft decided it needed to get with the program and take on a leadership role in this emerging environment. Microsoft boldly announced that it was going to "activate" the Internet in 1996 with ActiveX technologies (a little late, but better late than never). Thus, from these ActiveX technologies, the ActiveX controls were born. ActiveX controls were nothing really new—just an extension of their mother, the OLE control. ActiveX controls are simply OLE controls optimized for use across the Internet.
What Is an ActiveX Control? | Next Section

Account Sign In
View your cart