guides:programming:programmers_reference_manual:qualify_event_message

QUALIFY_EVENT message

Allows you to enable, disable, or modify event processing for the specified control. In addition, it supports the qualifying of any Windows message.

To request that a certain Windows message be sent to the WINMSG event.

To request that OLE messages be sentfo to the OLE event.

All controls

eventspecifier = Send_Message(controlID, "QUALIFY_EVENT", eventname, eventprocessing)

request = Send_Message(CtrlEntID, "QUALIFY_EVENT", uMsg, bRequest)

Parameters are as follows.

ParameterDescription
ControlIDSame information as contained in the ctrlEntID variable, from an event handler. The structure is Parent.Object, where Parent is the window identifier, and Object is the name of the control, and where Parent and Object are delimited by a period.
EventnameName of the event.
eventprocessingPass 1 to allow event processing, or 0 to prevent it.

Value - Description
0 - Disable event processing.
1: @fm: Qualifier
Enable or modify event processing.
CtrlEntIDThe qualified name of the window or control.
UmsgThe ID of the Windows message; this can be passed as a decimal (eg., 123) or a hexidecimal (eg., "0x123").
BrequestPass true to request the message or false to revoke the request for the message.

The Qualifier passed to Re-enable (or modify) the event processing is composed of the number of parameters and the key to the SYSREPOSEVENTEXES table, separated by an asterisk. For example, the Qualifier for the CLICK event (which takes only the two standard parameters, CtrlEntID and CtrlClassID) for the "OK" button on a SYSPROG application window named "MY_MSG" has the following format:

"2*SYSPROG*CLICK*MY_MSG.OK"

The current event specifier.

/* this example disables the click event for the "OK" button; note that the return value is in for form "1": @fm: Qualifier, which is the format that is passed to QUALIFY_EVENT to re-enable the event. */
Qualifier = Send_Message(@window: ".OK", "QUALIFY_EVENT", "CLICK", 0)
 

* re-enable the click event for the "OK" button
Send_Message (@window: ".OK", "QUALIFY_EVENT", "CLICK",  Qualifier)

/* this example changes the click event for the "OK" button to call the window's OMNIEVENT instead. */
Qualifier = 1: @fm: 2: "*": @appid<1>: "*OMNIEVENT*":  @WINDOW: "."
Send_Message(@window: ".OK", "QUALIFY_EVENT", "CLICK", Qualifier)
* The following code will QUALIFY the Right mouse click on editlines and edittables

 

* Qualify the Right Mouse click in an Edit table

retval = Send_Message(@window:'.TABLE_1', 'QUALIFY_EVENT', '0x7b', 1)

 

* Qualify the Right Mouse click in an Edit line

retval = Send_Message(@window: ".EDITLINE_1', 'QUALIFY_EVENT', '0x206',1)

 

* Handle the WINMSG Event for an Edit table

if message = 123 then

   *** Your process

end

 

* Handle the WINMSG Event for an Edit line

if message = 516 then

   *** Your process

end
  • guides/programming/programmers_reference_manual/qualify_event_message.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1