[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Controls' (#lcl)

# TCMMouseWheel

Defines a structure used for mouse wheel control messages.

## Declaration

Source position: controls.pp line 102

`type TCMMouseWheel = record`
`MSg: Cardinal;` |  | Cardinal value with the CM_MOUSEWHEEL identifier for the mouse wheel message.
`ShiftState: TShiftState;` |  | State of the modifier for keys and mouse buttons.
`Unused: Byte;` |  | Inserted for alignment only.
`WheelDelta: SmallInt;`
`case Integer of`
`0: (`
`XPos: SmallInt;` |  | Mouse X position as a SmallInt value.
`YPos: SmallInt;` |  | Mouse Y position as a SmallInt value.
`);`
`1: (`
`Pos: TSmallPoint;` |  | Mouse position as a TSmallPoint value.
`Result: LRESULT;` |  | Result for the mouse wheel message. Zero (0) indicates the message was handled.
`);`
`end;`

## Description

Holds mouse wheel details that include:

- the Message associated with the wheel
- the shift state (i.e. whether Shift, Alt, Control keys have been pressed)
- the mouse position
- the message Result