joySetThreshold

The joySetThreshold function sets the movement threshold of a joystick.

MMRESULT joySetThreshold(
  UINT uJoyID,     
  UINT uThreshold  
);

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.

uThreshold

New movement threshold.

Return Values

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

Value Description
MMSYSERR_NODRIVER The joystick driver is not present.
JOYERR_PARMS The specified joystick device identifier uJoyID is invalid.

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

Show: