Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : Introduction to External Program Interfaces : COM objects: Automation objects and ActiveX controls : COM objects supported in ABL : ActiveX controls
ActiveX controls
ActiveX controls (OCXs) are COM objects that rely on COM standards, including ActiveX Automation, to communicate with an application and also to provide a mechanism to generate events. ActiveX controls reside only in DLL files that provide the complete implementation, which often includes a user-interface component. As such, ActiveX controls are directly analogous to ABL widgets, but often include a variety of capabilities not available with the widgets built into ABL. For example, you can find ActiveX controls that function as calendars, pie charts, bar graphs, gauges, meters, and even communications, timing, and parsing controls that have no user-interface components.
Whether or not an ActiveX control includes a user-interface component, ABL supports a user-interface widget, the CONTROL-FRAME widget, to make the control available to your application. The control-frame widget anchors the ActiveX control to your application. This widget physically orients the control in the ABL user interface, but provides no other services for accessing it. A separate but related COM object, the control-frame COM object, provides the real control container support. This special ABL-supported COM object contains and provides direct access to the ActiveX control from ABL.
Note: Unlike with ActiveX Automation, you can use ActiveX controls only in OpenEdge graphical applications.
Support for VBX controls in earlier versions of Progress requires you to use special methods on a control-container widget to access any VBX control property or method. However for ActiveX controls, ABL allows you to access control properties and methods directly, without reference to the control-frame widgets that anchor them.
The following figure shows how ABL supports ActiveX controls.
Figure 38. ABL interface to ActiveX Controls
The control-frame widget and COM object work together to connect the ActiveX control to your application. As you might suspect, ABL supports different types of handles for widgets and COM objects. Thus, you access control-frame widgets using widget handles and access all COM objects (including ActiveX controls) using component handles. It is these component handles that allow you to gain direct access to the properties and methods of an ActiveX control (or Automation object).
Similar to VBX control support in earlier versions, ABL allows you to define event procedures to handle events generated directly by ActiveX controls. You can also handle events on the control-frame widget with user-interface triggers. Control-frame widget events (like TAB or LEAVE) allow you to coordinate user-interface actions between ActiveX controls and ABL widgets.