Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use joyGetPos
Message
De
30/12/2012 10:18:16
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
How to use joyGetPos
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01560907
Message ID:
01560907
Vues:
120
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
Fil
Voir

Click here to load this message in the networking platform