Joystick Notification Messages

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.