Joystick messages are sent to an application to notify the application that a joystick has moved or that one of its buttons has been pressed or released. Use these messages to get input from a joystick:
MM_JOY1BUTTONDOWN
Sent to a window that has captured joystick 1 when a button has been pressed.
MM_JOY1BUTTONUP
Sent to a window that has captured joystick 1 when a button has been released.
MM_JOY1MOVE
Sent to a window that has captured joystick 1 when the joystick position has changed.
MM_JOY1ZMOVE
Sent to a window that has captured joystick 1 when the joystick z-axis position has changed.
MM_JOY2BUTTONDOWN
Sent to a window that has captured joystick 2 when a button has been pressed.
MM_JOY2BUTTONUP
Sent to a window that has captured joystick 2 when a button has been released.
MM_JOY2MOVE
Sent to a window that has captured joystick 2 when the joystick position has changed.
MM_JOY2ZMOVE
Sent to a window that has captured joystick 2 when the joystick z-axis position has changed.