The JDD_GETPOS message is sent to get the current joystick position and button-state information.
Parameters
LPARAM lParam1
Specifies a pointer to a JOYINFO structure, which is described in the Win32 SDK.
LPARAM lParam2
Not used.
Return Value
If the driver successfully retrieves the information, JDD_GETPOS returns MMSYSERR_NOERROR. If the joystick is unplugged, JDD-GETPOS returns JOYERR_UNPLUGGED.
Comments
The coordinate values returned in the JOYINFO structure should be mapped into the coordinate range identified by the driver. The minimum and maximum values for each axis are defined in the JOYCAPS structure, which the driver fills out in response to the JDD_GETDEVCAPS message.