WinLocWheel

(Engine-Level Function)

Description: WinLocWheel returns TRUE when the mouse wheel is rolled while the mouse is over the specified window with the specified modifier key held down. This allows it to be used within a predicate.
Returns: Boolean
Usage: Steady State only.
Function Groups: Window
Related to:  
Format: WinLocWheel(Object, ModifierKey, ScrollChange);
Parameters:  
Object
Object is a module instance that is running inside a window.
ModifierKey
Defines the key that must be held down to activate the function. Either 4 (Shift) or 8 (Ctrl).
ScrollChange
Set to the direction and magnitude of the wheel movement.
Comments:

The function looks for mouse movements while the cursor is within the bounds of the object window.

The modifier key values come from the Win32 definitions of MK_SHIFTKEY(4) and MK_CTRLKEY(8).

When the mouse is over the window and the modifier key is held down, one mouse wheel "roll-click" will cause ScrollChange to be set to -1 or 1, depending on the direction of the roll.

On a very busy system, it is possible for multiple wheel rolls to be captured in one trigger of the statement, so ScrollChange may be any integral number but usually each roll-click results in a single trigger with ScrollChange set to -1 or 1.

Example:

If WinLocWheel(Obj, #CtrlKeyModifier, CtrlCounter);
[
  TotalScrollClicks += CtrlCounter;
]