joyGetThreshold

The joyGetThreshold function queries a joystick for its current movement threshold.

MMRESULT joyGetThreshold(
  UINT uJoyID,        
  LPUINT puThreshold  
);

Parameters

uJoyID

Identifier of the joystick. Valid values for uJoyID range from zero (JOYSTICKID1) to 15, except for Windows NT 4.0. For Windows NT 4.0, valid values are limited to JOYSTICKID1 and JOYSTICKID2.

puThreshold

Pointer to a variable that contains the movement threshold value.

Return Values

Returns JOYERR_NOERROR if successful or one of the following error values.

Value Description
MMSYSERR_NODRIVER The joystick driver is not present.
MMSYSERR_INVALPARAM An invalid parameter was passed.

Remarks

The movement threshold is the distance the joystick must be moved before a joystick position-change message (MM_JOY1MOVE,MM_JOY1ZMOVE, MM_JOY2MOVE, or MM_JOY2ZMOVE) is sent to a window that has captured the device. The threshold is initially zero.

Requirements

**  Windows NT/2000/XP:** Included in Windows NT 3.1 and later.
**  Windows 95/98/Me:** Included in Windows 95 and later.
**  Header:** Declared in Mmsystem.h; include Windows.h.
**  Library:** Use Winmm.lib.

See Also

Joysticks, Multimedia Joystick Functions