Method XbpActiveXControl():subscribeStdEvents() Foundation
Registers event processing for standard ActiveX control events.
:subscribeStdEvents() --> self
This method always returns NIL.
:subscribeStdEvents() is called automatically during creation of an ActiveX control. The method has the PROTECTED attribute and can only be accessed from within derived classes. It cannot be called directly by Xbase++ applications.
The method :subscribeStdEvents() registers event processing for standard ActiveX control events. The event processor installed by :subscribeStdEvents() ensures that the application is notified about standard actions, such as mouse button clicks or key presses, using the normal event handling protocol defined for Xbase Parts.
Internally, :subscribeStdEvents() uses functionality provided by its base class ActiveXObject to install an event handler for the events defined in the control's default event set. This enables an Xbase++ application to react to the standard events defined by a control after the control was created. See method ActiveXObject:COMDefaultHandler() for further information on COM events and event management.
The following table lists the standard ActiveX events supported by :subscribeStdEvents(), along with their corresponding callback methods. The dispatch IDs of the events listed below are defined in the file ACTIVEX.CH.
Event Name | Dispatch ID | Callback Method | Description |
---|---|---|---|
MouseDown | DISPID_MOUSEDOWN | :mouseDown() | Mouse button was depressed |
MouseUp | DISPID_MOUSEUP | :mouseUp() | Mouse button was released |
MouseMove | DISPID_MOUSEMOVE | :mouseMove() | Mouse was moved over the control |
Click | DISPID_CLICK | :click() | Mouse button was clicked |
DblClick | DISPID_DBLCLICK | :dblClick() | A double-click was performed |
KeyDown | DISPID_KEYDOWN | :keyDown() | Key was depressed on the keyboard |
KeyUp | DISPID_KEYUP | :keyUp() | Key was released on the keyboard |
If one of the standard events supported by the XbpActiveXControl class is not defined in the control's default event set, :subscribeStdEvents() uses the ActiveX control's type library information to check if the event is exposed by another interface defined by the control class. If so, :subscribeStdEvents() also installs an event handler for the respective event interface(s).
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.