Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capture Windows Messages sent from a API to VFP. HELP!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00466118
Message ID:
00466800
Vues:
10
>Hi Mike,
>
>>>How do you define a handler for the undefined WM_ messages in straight VFP? Inquring minds and all that?
>>
>>Like you would with any other language, I suppose
>
>In any other language you would install either a system hook or create a new Window Class. Both don't work in VFP as you need an address to a procedure in machine code. There's indeed one solution that could work in VFP, but it's not only slow, but also not reliable as it bases on polling the message queue using PeekMessage and eventually WaitMessage(). Since I've not tested this practically, I can't think of what kind of effect it might have on VFP itself since suspending the thread to wait for messages might interfere with VFP.

The approach of constantly polling with PeekMessage() is one I hadn't thought of; it'd eat VFP's performance doing it, and couldn't be used in conjunction with any operation that executed as an atomic statement in VFP. I remember you writing an FLL at one point that dealt with either this issue or the issue of using some of the enumeration functions that required a callback and required parallel execution with VFP code; do you have a pointer to that lying about?

>
>Christof
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform