|
Joystick Capabilities
Joysticks can support two- or three-axis movement and up to four buttons.
Joysticks also support different ranges of motion and polling frequencies. The range of motion is the distance a joystick handle can move from its
resting position to the position farthest from its resting position. The polling
frequency is the time interval between joystick queries.
Joystick drivers can support either one or two joysticks. You can determine
the number of joysticks supported by a joystick driver by using the joyGetNumDevs function. This function returns an unsigned integer that contains the number
of supported joysticks or zero if there is no joystick support. The return
value does not indicate the number of joysticks attached to the system.
You can determine if a joystick is attached to the system by using the joyGetPos function. This function returns JOYERR_NOERROR if the specified device is
attached. Otherwise , it returns JOYERR_UNPLUGGED.
Each joystick has several capabilities that are available to your application.
You can retrieve the capabilities of a joystick by using the joyGetDevCaps function. This function fills a JOYCAPS structure with joystick capabilities such as the minimum and maximum values
for its coordinate system, the number of buttons on the joystick, and the
minimum and maximum polling frequencies.
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|