The joyGetPosEx function queries a joystick for its position and button status.
MMRESULT joyGetPosEx(
UINT uJoyID,
LPJOYINFOEX pji
);
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. | |
MMSYSERR_BADDEVICEID | The specified joystick identifier is invalid. | |
JOYERR_UNPLUGGED | The specified joystick is not connected to the system. |
This function provides access to extended devices such as rudder pedals, point-of-view hats, devices with a large number of buttons, and coordinate systems using up to six axes. For joystick devices that use three axes or fewer and have fewer than four buttons, use the joyGetPos function.
Windows NT: Requires version 3.1 or later.
Windows: Requires Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in mmsystem.h.
Import Library: Use winmm.lib.
Joysticks Overview, Multimedia Joystick Functions, JOYINFOEX, joyGetPos