OnMouseWheel

This event occurs when a user rotates the mouse wheel and encounters the wheel’s next notch.

 

JavaScript

 

OnMouseWheel(

       Flags,

       zDelta,

       X,

       Y)

 

C#

 

bool OnMouseWheel(

       int Flags,

       short zDelta,

       int X,

       int Y)

 

C++

 

HRESULT OnMouseWheel(

       [in] long Flags,

       [in] short zDelta,

       [in] int X,

       [in] int Y,

       [out, retval] VARIANT_BOOL* pbHandled)

Parameters

Flags

Indicates whether various virtual keys are down. This parameter can be any combination of the following values:

·          MK_ LBUTTON                  = 1

·          MK_ RBUTTON                  = 2

·          MK_ SHIFT                          = 4

·          MK_CONTROL                   = 8

·          MK_ MBUTTON                =16

ZDelta

Indicates distance rotated. The zDelta value is expressed in multiples or divisions of WHEEL_DELTA, which is 120. A value less than zero indicates rotating back (toward the user) while a value greater than zero indicates rotating forward (away from the user). The user can reverse this response by changing the wheel setting in the mouse software.

X

The X-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Y

The Y-coordinate of the mouse. The coordinates are given in screen coordinates, with the origin in the top-left corner of the 3D Window.

Return Value

pbHandled

Once the method call is returned, pbHandled contains the Boolean return value that indicates whether or not the client handled the mouse action itself and does not wish TerraExplorer to respond to the mouse action. When the value is FALSE, TerraExplorer handles the mouse action.