The Ocx system class provided by JADE handles any external OLE objects that are registered on your workstation and added to JADE by the interface to external ActiveX controls (formerly known as external Object Linking and Editing, or OCX, controls).
To register and run an ActiveX control, all libraries used by the control must be available.
An ActiveX control is contained in a library written in a language like C++ by an external developer. This library defines the behavior of a Window class OCX control.
When an ActiveX control is imported using the earlier import option, a JADE subclass of the Ocx class is created that describes the properties, methods, and events defined and exposed by the ActiveX control. This information is obtained from the control itself. At run time, JADE translates the property and method requirements into ActiveX control equivalents and then calls the control to perform the function.
As the ActiveX control is external to JADE, no documentation about the control is contained within JADE, and any problems in the functionality of the control should be taken up with the suppliers of that control. If an error occurs, JADE is dependent on the control returning error information that can be displayed to the user.
This class has now been superseded by the ActiveXControl class, but it is still valid.
Transparent sibling controls are always painted before an Ocx control, regardless of their zOrder settings. It is not possible to handle the painting of transparent controls in the correct zOrder when some controls are directly painted by JADE and others are painted by Windows separately.
All ActiveX controls are defined as subclasses of the JADE abstract Ocx class. OCX subclasses inherit all of the standard properties and methods of the Window, Control, and Ocx classes, although not all of these properties and methods have meaning to the control.
To refresh an ActiveX control that has changed but is already imported into JADE, simply import the ActiveX again and give it the same name that it had previously.
The following OCX standard properties are handled automatically by JADE, using the Window class or Control class properties summarized in the following table. The control may not have implemented these standard ActiveX properties, and changing them by using JADE logic may then have no effect.
OCX Property | JADE Property |
---|---|
DISPID_BACKCOLOR | backColor |
DISPID_BORDERSTYLE | borderStyle |
DISPID_FORECOLOR | foreColor |
DISPID_ENABLED | enabled |
DISPID_FONT | fontBold, fontName, fontSize, fontUnderline, fontStrikethru, fontItalic |
DISPID_TABSTOP | tabStop |
The following ActiveX properties are assumed to be the equivalent JADE Window properties when the property types match.
For a summary of the constants, property, method, and events defined in the Ocx class, see "Ocx Class Constants", "Ocx Property", "Ocx Method", and "Ocx Events", in the following subsections.