GXKeyList

Send Feedback

The GXKeyList structure provides information about the default hardware button assignments.

Note   GAPI is deprecated. Use DirectDraw and Direct3D Mobile APIs instead.

Syntax

struct GXKeyList {
  short vkUp;
  POINT ptUp;
  Short vkDown;
  POINT ptDown;
  Short vkLeft;
  POINT ptLeft;
  Short vkRight;
  POINT ptRight;
  Short vkA;
  POINT ptA;
  Short vkB;
  POINT ptB;
  Short vkC;
  POINT ptC;
  Short vkStart;
  POINT ptStart;
};

Members

  • vkUp
    Virtual key code of the best key to use for "up."
  • ptUp
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.
  • vkDown
    Virtual key code of the best key to use for "down."
  • ptDown
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.
  • vkLeft
    Virtual key code of the best key to use for "left."
  • ptLeft
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.
  • vkRight
    Virtual key code of the best key to use for "right."
  • ptRight
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.
  • vkA
    Virtual key code to use for the primary action button — usually the "shoot" or "jump" button in a game.
  • ptA
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.
  • vkB
    Best key for the secondary action button.
  • ptB
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.
  • vkC
    Best key for the tertiary action button; also could be used for the "select" button.
  • ptC
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.
  • vkStart
    Best key for starting or pausing a game.
  • ptStart
    x,y position of key or button. The position is in screen coordinates, see the Remarks section for more information.

Remarks

The POINT values in the structure refer to the physical location of the buttons on the device in screen coordinates, relative to the top, left corner of the screen. This means that on a device with a screen resolution of 240 x 320, a button to the right of the screen might have the coordinates (280,100), a button below the screen might have coordinates (120,350), and a button to the left of the screen might have coordinates (-60,100). This information is useful if you want to provide users with hints for button locations, such as drawing an arrow on the screen indicating a game's "jump" button.

Requirements

Pocket PC: Pocket PC 2000 and later
Smartphone: Smartphone 2002 and later
OS Versions: Windows CE 3.0 and later
Header: gx.h
Library: gx.lib

See Also

GAPI Structures | Windows Mobile Game Programming

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.