Login
`
Templates, Tools and Utilities
|
||
Add a comment to an Icetips ArticlePlease add your comments to this article.
Please note that you must provide both a name and a valid email address in order
for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!
Back to article list Search Articles Add Comment Printer friendly Direct link Windows API: SendMessage and RegisterWindowMessage 2004-05-10 -- Richard Rogers Newsgroups: softvelocity.clarion.language
You might wat to try this...
API PROTOTYPES
SendMessage(SIGNED,SIGNED,SIGNED,LONG),LONG,PASCAL,NAME('SendMessageA')
RegisterWindowMessage(LONG),UNSIGNED,PASCAL,RAW,PROC,NAME('RegisterWindowMessageA')
DATA DECLS
MessageRegister CSTRING(255)
MOD:wHandle LONG
MyDoSomethingSilly LONG
CODE
MessageRegister = 'DoSomethingSilly'
MyDoSomethingSilly = RegisterWindowMessage(ADDRESS(MessageRegister))
RET# = SendMessage(MOD:wHandle,WM_COMMAND,MyDoSomethingSilly,0)
Subclass your procedure and watch for your registered messages.
Additional info can be passed with wParam and lParam.
I usually make wHandle the first parameter in the procedure prototype
and when an outside application (C++, VB, doesn't matter) wants to use
my procedure, all they have to do is pass me their window handle. The
first thing I do after that is send them a message containing MY
window handle. After that, the lines of communication are wide open.
MUCH faster than DDE. Much more reliable.
I have a Clarion Graphics module talking with a POS system written in
C++ this way. Very sweet and simple.
On 8 May 2004 10:35:22 -0400, "Charles Edmonds"
Today is May 6, 2024, 3:44 pm This article has been viewed 35310 times. Google search has resulted in 586 hits on this article since January 25, 2004.
|
|