Try OpenEdge Now
skip to main content
Programming Interfaces
External Program Interfaces : ActiveX Control Support : Handling events : Handling ActiveX control events : Using system handles in OCX event procedures
 
Using system handles in OCX event procedures
ABL allows you to obtain the identities of both the ActiveX control that generates an event and the associated control-frame widget from within an OCX event procedure. The COM-SELF system handle returns the component handle of the ActiveX control and the SELF system handle returns the widget handle of the control-frame. This is especially useful in generic event procedures where the source of an event cannot be known.
Unlike for ABL ON triggers, the RETURN NO-APPLY statement has no affect in an OCX event procedure. Some COM object events provide a similar mechanism using output parameters. For example, the standard KeyPress event passes a key code as an INPUT-OUTPUT parameter. If you set this parameter to 0 in the event handler, the key is discarded.
Note: To trigger an ABL widget event from ABL, you use the APPLY statement. However, to trigger an ActiveX control event in ABL, you execute its OCX event procedure as a standard internal procedure, passing any required parameters.