Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[The feature associated with this page, Joysticks, is a legacy feature. It has been superseded by Windows.Gaming.Input Namespace. Windows.Gaming.Input Namespace has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Windows.Gaming.Input Namespace instead of Joysticks, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]
Joystick messages notify your application that a joystick has changed position or that one of its buttons has changed states. Messages beginning with MM_JOY1 are sent to the function if your application requests input from the joystick using the identifier JOYSTICKID1, and MM_JOY2 messages are sent if your application requests input from the joystick using the identifier JOYSTICKID2.
The messages in the following table identify the status of the joystick buttons:
Message | Description |
---|---|
MM_JOY1BUTTONDOWN | A button on joystick JOYSTICKID1 has been pressed. |
MM_JOY1BUTTONUP | A button on joystick JOYSTICKID1 has been released. |
MM_JOY1MOVE | Joystick JOYSTICKID1 changed position in the x- or y-direction. |
MM_JOY1ZMOVE | Joystick JOYSTICKID1 changed position in the z-direction. |
MM_JOY2BUTTONDOWN | A button on joystick JOYSTICKID2 has been pressed. |
MM_JOY2BUTTONUP | A button on joystick JOYSTICKID2 has been released. |
MM_JOY2MOVE | Joystick JOYSTICKID2 changed position in the x- or y-direction |
MM_JOY2ZMOVE | Joystick JOYSTICKID2 changed position in the z-direction. |
All messages report nonexistent buttons as released.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register today