Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pass String Data Between App Using SendMessage
Message
De
21/07/2000 05:36:58
 
 
À
21/07/2000 03:53:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00395247
Message ID:
00395270
Vues:
10
>Hi,
>
>is there an example for using sendMessage to pass string data between Applications?
>

IMO, it's a very poor way to do this, especially with VFP, which does not provide an easy mechanism to add Windows Message handlers to the event loop. If you want to pursue it, there's sample code (in C++) using WM_COPYDATA as a messaging structure in Jeff Richter's "Advanced Windows"; while you could issue a WM_COPYDATA message inside VFP, there's no way to add a handler for the message to a VFP app without writing something in another language to hook the thread's message queue. VFP does directly support both DDE and COM, and can exchange data using the Clipboard - you might investigate putting something on the Clipboard in one app and using SendMessage() to synthesize a keystroke for another app to tell it to hit the Clipboard for data (VFP could receive a character and process it through an ON KEY LABEL; you'd send the character by synthesizing the virtual keystroke using WM_KEYDOWN and WM_KEYUP. I'd look at using PostMessage() rather than SendMessage())

I don't have code to give you for this, and you face several problems regarding implementing message processing for a VFP app which could well have several active Windows. I'd look to one of the other data exchange mechanisms rather than waste what could become a great deal of time on the process.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform