Setting the Movement Threshold

You can change the movement threshold of the joystick by calling the joySetThreshold function. The movement threshold is the number of device units that the stick must be moved before an MM_JOYMOVE message is sent to the window that has captured the device. The joySetThreshold function has the following syntax:

WORD joySetThreshold(wID, wThreshold)

The two parameters, wID and wThreshold, identify the joystick device and specify the movement threshold. You can get the minimum resolution of the joystick by calling the joyGetDevCaps function.