The DXMouseWheel plugin adds support for the mouse wheel to your DesktopX objects. ScreenShot

Documentation

The plugin works by making three new callback functions available for use in your scripts:

  • Wheel_OnMouseWheel(rotation)
  • Wheel_OnMButtonDown(x, y)
  • WHeel_OnMButtonUp(x, y)

Wheel_OnMouseWheel(rotation)

When the mouse is over the object and the mousewheel is used, the Wheel_OnMouseWheel function will be called with the wheel rotation passed as a parameter.

The wheel rotation will be a multiple of WHEEL_DELTA, which is set at 120. A positive value indicates that the wheel was rotated forward, away from the user; a negative value indicates that the wheel was rotated backward, toward the user.

For more information on MouseWheel messages, see:
WM_MOUSEWHEEL

Note: If your object has the focus but the mouse is over another window, you will not get mouse wheel events.

Wheel_OnMButtonDown(x, y) & Wheel_OnMButtonUp(x, y)

When you middle click on your object, the Wheel_OnMButtonDown function will be called. When you release the button, the Wheel_OnMButtonUp function will be called.

Both functions will have the mouse coordinates relative to your object passed as parameters.

For more information:
WM_MBUTTONDOWN
WM_MBUTTONUP