Results 1 to 5 of 5

Thread: Capturing 8 buttons

  1. #1

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Capturing 8 buttons

    Hi, I recently acquired a Logitech MX500, which has many buttons. It has these 8 buttons:

    - Left
    - Right
    - Middle (wheel click)
    - Wheel Down/Cruise Down (1 button)
    - Wheel Up/Mouse Up (1 button)
    - Task Switch
    - Back
    - Forward

    The GetSystemMetrics API call says that I have 8 buttons, so there must be a way to capture them (API only though, as this is so I can map these buttons to keystrokes in 3D games).

    So far, I have subclassed the form. I've got the program printing the messages and values to the debug.print screen, but I can't figure out the trend (ex. why this value appears when i click 'task switch' but another doesn't). Does anyone have a clue how I can capture this info?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Do you have Spy++? Because with it you can monitor what messages and parameters are being send to a given window.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Good idea - I have the enterprise edition of VB6 so I should. Thanks for the tip, I'll let you know how far I get.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  4. #4
    Lively Member
    Join Date
    Mar 2002
    Posts
    110
    this might help-from msdn

    joyGetPosEx
    The joyGetPosEx function queries a joystick for its position and button status.

    MMRESULT joyGetPosEx(
    UINT uJoyID,
    LPJOYINFOEX pji
    );
    Parameters
    uJoyID
    Identifier of the joystick (JOYSTICKID1 or JOYSTICKID2) to be queried.
    pji
    Pointer to a JOYINFOEX structure that contains extended position information and button status of the joystick. You must set the dwSize and dwFlags members or joyGetPosEx will fail. The information returned from joyGetPosEx depends on the flags you specify in dwFlags.
    Return Values
    Returns JOYERR_NOERROR if successful or one of the following error values.

    Value Description
    MMSYSERR_NODRIVER The joystick driver is not present.
    MMSYSERR_INVALPARAM An invalid parameter was passed.
    MMSYSERR_BADDEVICEID The specified joystick identifier is invalid.
    JOYERR_UNPLUGGED The specified joystick is not connected to the system.


    Remarks
    This function provides access to extended devices such as rudder pedals, point-of-view hats, devices with a large number of buttons, and coordinate systems using up to six axes. For joystick devices that use three axes or fewer and have fewer than four buttons, use the joyGetPos function.

    Requirements
    Windows NT/2000: Requires Windows NT 3.1 or later.
    Windows 95/98: Requires Windows 95 or later.
    Header: Declared in Mmsystem.h.
    Library: Use Winmm.lib.

    See Also
    Joysticks Overview, Multimedia Joystick Functions, JOYINFOEX, joyGetPos

  5. #5
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    This help any?

    Mouse Input

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width