OLE event

OLE objects

The OLE event is generated for each message generated by an OLE object that is requested using QUALIFY_EVENT.

Note: The event qualifier ALL_OLES sends all OLE messages to the specified event handler. To determine which events are being generated by an OLE control, examine the EventName parameter after using the ALL_OLES qualifier to handle all OLE events.

Note: The event qualifier ALL_WINMSGS sends all Windows messages to the OLE object's WINMSG event handler. Use the ALL_WINSMSGS event handler to process Windows messages sent to OLE objects.

bForward = OLE(CtrlEntID, CtrlClassID, hWnd, Message, wParam, lParam)

OLE events send the following parameters:

EventNameThe name of the OLE event
Param1…Param10Up to 10 parameters, separated by commas.

Note: Special Event Qualifier parameters for OLE events that can be optionally passed. These are:

1Modify Flag. Same as for other events. 0 = clear event; 1 = set event
2Event Qualifier. Same as for other events. However, this is optional if param<3> is supplied. Also for OLE events, the arg count prefix is optional and is ignored if supplied.
3Event Name. Overrides the event name sent to Send_Event().
4Synchronous flag. 0 = event is posted to the Windows message queue to be processed at a later time. 1 = event is fired immediately.
5Suppress Name flag. 1 = Do not pass OLE event name to event handler.
6Pass DispID flag. 1 = Pass OLE dispid to event handler.
7Pass single parameters. 0 = Pass OLE event parameters as a single argument, delimited by field marks.

Directing Windows Messages to a WINMSG Event handler

/* direct all Windows messages to the WINMSG event in the OLE control called HTML. */
OleEvent = 'ALL_WINMSGS'
x=Send_Message(@WINDOW:'.HTML', 'QUALIFY_EVENT', OleEvent, 1)

Directing OLE Messages to an OLE Event Handler

/* direct all OLE messages to the OLE event in the OLE control called HTML.
Fire the event immediately.
Send the parameters in a single field mark delimited variable. */

Qualifier ='' 
Qualifier<1> = 1
Qualifier<4> = 1 ; * synch
Qualifier<7> = 0 ; * single param
OleEvent = 'ALL_OLES'
x=Send_Message(@WINDOW:'.HTML', 'QUALIFY_EVENT', OleEvent, Qualifier)
  • programming/programmers_reference_manual/ole_event.txt
  • Last modified: 2024/06/19 20:20
  • by