DirectX SDK

DIMOUSESTATE

The DIMOUSESTATE type contains information about the state of a mouse device or another device that is being accessed as if it were a mouse device. This type is used with the DirectInputDevice.GetDeviceStateMouse method.

Type DIMOUSESTATE
    buttons(0 To 3) As Byte
    x As Long
    y As Long
    z As Long
End Type

Members

buttons
Array of button states. The high-order bit of the byte is set if the corresponding button is down.
x
Information about the mouse x-axis.
y
Information about the mouse y-axis.
z
Information about the mouse z-axis (typically a wheel). If the mouse does not have a z-axis, then the value is 0.

Remarks

Immediate data is returned in this type from a device that has been prepared by passing the DIFORMAT_MOUSE constant to the DirectInputDevice.SetCommonDataFormat method.

If an axis is in relative mode, then the appropriate member contains the change in position since the last call to this method. If the axis is in absolute mode, then the member contains the accumulated relative motion in relation to an arbitrary start point. The absolute axis position is not meaningful except in comparison with other absolute axis positions.