Information générale
Catégorie:
Fonctions Windows API
Titre:
How to use joyGetPos
Versions des environnements
DECLARE integer joyGetNumDevs IN winmm
?joyGetNumDevs() && returns 16 (=driver can hold 16 joysticks)
DECLARE long joyGetPos IN winmm.dll long device, string@ joyinfo
lcjoyinfo=replicate([ ],4)
?joygetpos(0,@lcjoyinfo) && returns 165 bad parameters...
...
?joygetpos(15,@lcjoyinfo) && returns 165 bad parameters...
I saw in the example of MSDN (for C++) that joyinfo parameter is a 4 entry structure.
How to code this structure into VFP?
Does the 165 mean something else ( i.e. no joystick is conected...)??
My joystick is an old simple one with 2 axies and 2 buttons and connected to a USB port thru a 15pin-to-USB cable.
My target is to identify which joystick button is pressed.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement