JOYCAPS structure (joystickapi.h)

The JOYCAPS structure contains information about the joystick capabilities.

Syntax

typedef struct joycaps_tag {
  WORD wMid;
  WORD wPid;
  char szPname[MAXPNAMELEN];
  UINT wXmin;
  UINT wXmax;
  UINT wYmin;
  UINT wYmax;
  UINT wZmin;
  UINT wZmax;
  UINT wNumButtons;
  UINT wPeriodMin;
  UINT wPeriodMax;
  UINT wRmin;
  UINT wRmax;
  UINT wUmin;
  UINT wUmax;
  UINT wVmin;
  UINT wVmax;
  UINT wCaps;
  UINT wMaxAxes;
  UINT wNumAxes;
  UINT wMaxButtons;
  char szRegKey[MAXPNAMELEN];
  char szOEMVxD[MAX_JOYSTICKOEMVXDNAME];
} JOYCAPS, *PJOYCAPS, *NPJOYCAPS, *LPJOYCAPS;

Members

wMid

Manufacturer identifier. Manufacturer identifiers are defined in Manufacturer and Product Identifiers.

wPid

Product identifier. Product identifiers are defined in Manufacturer and Product Identifiers.

szPname[MAXPNAMELEN]

Null-terminated string containing the joystick product name.

wXmin

Minimum X-coordinate.

wXmax

Maximum X-coordinate.

wYmin

Minimum Y-coordinate.

wYmax

Maximum Y-coordinate.

wZmin

Minimum Z-coordinate.

wZmax

Maximum Z-coordinate.

wNumButtons

Number of joystick buttons.

wPeriodMin

Smallest polling frequency supported when captured by the joySetCapture function.

wPeriodMax

Largest polling frequency supported when captured by joySetCapture.

wRmin

Minimum rudder value. The rudder is a fourth axis of movement.

wRmax

Maximum rudder value. The rudder is a fourth axis of movement.

wUmin

Minimum u-coordinate (fifth axis) values.

wUmax

Maximum u-coordinate (fifth axis) values.

wVmin

Minimum v-coordinate (sixth axis) values.

wVmax

Maximum v-coordinate (sixth axis) values.

wCaps

Joystick capabilities The following flags define individual capabilities that a joystick might have:

Flag Description
JOYCAPS_HASZ Joystick has z-coordinate information.
JOYCAPS_HASR Joystick has rudder (fourth axis) information.
JOYCAPS_HASU Joystick has u-coordinate (fifth axis) information.
JOYCAPS_HASV Joystick has v-coordinate (sixth axis) information.
JOYCAPS_HASPOV Joystick has point-of-view information.
JOYCAPS_POV4DIR Joystick point-of-view supports discrete values (centered, forward, backward, left, and right).
JOYCAPS_POVCTS Joystick point-of-view supports continuous degree bearings.

wMaxAxes

Maximum number of axes supported by the joystick.

wNumAxes

Number of axes currently in use by the joystick.

wMaxButtons

Maximum number of buttons supported by the joystick.

szRegKey[MAXPNAMELEN]

Null-terminated string containing the registry key for the joystick.

szOEMVxD[MAX_JOYSTICKOEMVXDNAME]

Null-terminated string identifying the joystick driver OEM.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header joystickapi.h (include Windows.h)

See also

Joysticks

Multimedia Joystick Structures

joySetCapture