共用方式為


ActiveX Controls: Overview

How Do IDetailsSample

ActiveX controls, formerly known as OLE controls, let you develop sophisticated controls based on the Common Object Model (COM) that can be installed in dialog boxes or any ActiveX control container application, including pages on the Internet’s World Wide Web and Visual Basic applications. Unlike Visual Basic (VBX) controls, ActiveX controls can be built in either 32-bit or 16-bit versions. With some work, you can convert existing VBXs to ActiveX controls.

An ActiveX control is an COM-based object that can draw itself in its own window, respond to events (such as mouse clicks), and be managed through an interface that includes properties and methods similar to those in Automation objects. The only limitation on the kinds of ActiveX controls you can create is your imagination.

These controls can be developed for many uses, such as database access, data monitoring, or graphing. Besides their portability, ActiveX controls support features previously not available to custom controls, such as compatibility with existing OLE containers and the ability to integrate their menus with the OLE container menus. In addition, an ActiveX control fully supports Automation, which allows the control to expose writable properties and a set of methods that can be called by the control user.

Beginning with MFC 4.2, you can create windowless ActiveX controls and controls that only create a window when they become active. Windowless controls speed up the display of your application and make it possible to have transparent and nonrectangular controls. With MFC versions 4.2 and later, you can also load ActiveX control properties asynchronously.

What do you want to do?