General information
Category:
Windows API functions
>DECLARE INTEGER GetMessage IN WIN32API STRING @, INTEGER, INTEGER, INTEGER
>You probably know the id of the message you want to retrieve, so, set the 3rd >and 4th param to that id. Pass 0 as 2nd param, so you don't have problems with >window handles.
>The first param is where you receive the message. This param is a C structure, >so, you can use a VFP string. The structure has 28 bytes, so the string must >also have 28 chars. Initialize it to REPL(CHR(0), 28).
>After the function call, parse the first param (ie your string) to get the >returned info. Each structure member has 4 bytes, except the last one which >has 8 bytes.
>The function returns -1 if error.
>Vlad
>Has anyone used the windows API GetMessage() in VFP6? I am having problems with the syntax and exactly how to use it.
>
>I need to use GetMessage() because I am trying to interface with an application that is sending me a message and waiting on a return that the message was received.
>
>I do have the variables of my window handle and the other apps handle.
>
>Any help would be greatly appreciated.
>
>Thanks,
>
>Jeff
Hello Vlad,
How do I get the id of the message I want to retrieve? Is it the window handle of the sending program? Do I register the message myself with RegisterWindowMessage?
I have tried both of the above and it locks on the GetMessage()line. Should I use a timer and PeekMessage() as an alternate method or is GetMessage the best function?
Thanks,
Jeff
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only