The Joystick application in the Control Panel calculates calibration values for the device. Use the calibration values to convert the actual values returned by the hardware device to the logical values expected by the joystick interface. The driver establishes the logical value range in its response to the JDD_GETDEVCAPS message.
The calibration settings consist of base and delta values for each coordinate. The base value represents the lowest logical value the driver returns; the delta value is the multiplier to use when converting the actual value returned by the device to a logical value appropriate for the established value range.
Immediately after WINMM loads the joystick driver, it reads the calibration values from the registry and sends them to the driver with the JDD_SETCALIBRATION message. WINMM sends the JDD_SETCALIBRATION message with two JOYCALIBRATE structures (pointers to them are passed in the lParam1 and lParam2 parameters). The first structure contains the new calibration settings that the driver should adopt. The driver should fill the second structure with the previous calibration settings.