|
-
Jan 12th, 2003, 03:13 PM
#1
Thread Starter
Good Ol' Platypus
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)
-
Jan 12th, 2003, 04:06 PM
#2
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
-
Jan 12th, 2003, 04:50 PM
#3
Thread Starter
Good Ol' Platypus
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)
-
Jan 12th, 2003, 05:59 PM
#4
Lively Member
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
-
Jan 12th, 2003, 06:41 PM
#5
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|