|
Joystick Notifications
You can capture direct joystick messages to be sent to a function by using the joySetCapture function. Only one application at a time can capture messages from a
joystick, but you can query the joystick from another application by using the joyGetPos or joyGetPosEx function.
Note A joystick message can fail to reach the application that captured the
joystick if a second application uses joyGetPos or joyGetPosEx to query the joystick at approximately the same time that the message is
sent. In this case, the second application could intercept the message.
If you want to capture messages from two joysticks attached to the system, use joySetCapture twice, once for each joystick. Your window receives separate and distinct
messages for each device.
You can release a captured joystick by using the joyReleaseCapture function. If an application does not release the joystick before ending, the
joystick is automatically released shortly after the capture window is
destroyed.
You cannot capture an unplugged joystick. The joySetCapture function returns JOYERR_UNPLUGGED if the specified device is unplugged.
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
|