Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capture Windows Messages sent from a API to VFP. HELP!
Message
 
 
À
20/01/2001 02:16:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00466118
Message ID:
00466272
Vues:
8
Hi!

Making this using VFP is raser hard and tremendous than beneficial.

There are 2 ways.

One is suggested by Ed to use ActiveX for this or VFPCOM dll. This requires very accurate approach.

We also made an interesting ActiveX control using C++ that makes it as easy as possible to organize passing of the procedure from VFP into Windows API functions. It publishes a pointer to the internal procedure in the ActiveX in the property. In VFP you can use it to pass into API functions that require reference to the procedure. The VFP code required to run when such procedure called by API is put into the event of ActiveX object. There are different kind of events that server different parameters into the prodcedure, which will be called is selected by special property.
It is not a big deal to make similar control.

Another is more simple.

Suggesting that you know other programming languages because you work on the level of the Windows events, I guess it will be not a problem for you to write a simple service that will catch mentioned events. Than put information from these events into the file. In the VFP application make a timer that will chack for this file in the interval fo 1 second. If such file appears - you will have information from it to get data of event.

To work with file in VFP you can use low-level file functions like FOPEN, FCLOSE, FREAD, etc. To delete file use ERASE command.

>Need a Guru to help me with the following; will PAY if needed!
>My name is Gary I am a programmer in Fox but I am limited in some of the
>newer functions and abilities of VFP... I am looking for a way to
>caputre/hook into the Windows Messaging System so I can display the messages
>that are being sent to a defined window on the screen. There is a way to do
>this in basic (I'm not a basic programmer) but here is the we page
>http://support.microsoft.com/support/kb/articles/Q168/7/95.asp. Windows
>sends messages to each of your defined windows telling them how offten to refresh,colors etc.. A API that I'm working with sends a message to the VFP open window and I don't know how to capture it. Here is what the API vendor told me:
>
>************
>The following are two Windows messages sent by our API to the applicaton
>Window.
>
>WM_UPSDISCONNECT (defined as WM_USER+1)
>WM_UPSLINK (defined as WM_USER+2)
>
>Both of these messages use a UPSmsg structure to send message specific data.
>UPSmsg is defined as follows.
>
>typedef struct
>{
>long Statur;
>long StatusDesc;
>char szMsg[32];
>)UPSmsg;
>
>**************
>
>I also opend up a header file for basic which was sent as a sample for
>various API calls to find any info relating to the above; here is what I
>found: Note this is for BASIC
>
>' UPSlink-specific messages sent to the application window
>Public Const WM_USER = &H0400 ' defined by Windows
>Public Const WM_UPSCONNECT = WM_USER+1
>Public Const WM_UPSLINK = WM_USER+2
>
>
>If you think you could help or refer me to some GURU it would be
>appreciated.
>
>Gary Mathis
>Carrera Computers
>
>Ph: (909) 678-4522
>fax: (909) 678-3483
>email: gary@frtplus.com
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform