Heike Posted January 29, 2003 Posted January 29, 2003 I developed an EXE (VB.NET) which is called by a COOL:Plex program. Now I got the following job: if something specific happens "send a windows message with number 42" because that let's e.g. refresh a TreeView (in that COOL:Plex program). My question now is: how can I do that? I have no idea because I never worked with windows messages before (not in C neither in VB 6.0). After searching everywhere in the www I seem to know that I must use the API-Function SendMessage. Does anyone have a simple example how to use it? Thx Quote
*Experts* Nerseus Posted January 29, 2003 *Experts* Posted January 29, 2003 Are you trying to send a message to the COOL:Plex program or is it trying to send something to you? If you're trying to send it a message, use SendMessage. You'll need the window handle (hWnd) of the window. You can get it through the API FindWindow or a similar function. This MAY not work, depending on the windows that COOL:Plex creates. FindWindow finds top level windows and if the one you're sending a message to is farther down, you may have to loop and find it. Assuming COOL:Plex is designed to be interfaced to, they should have made it pretty simple. SendMessage also takes a message number, 42 in your case. The wParam and lParam can be 0 unless the COOL:Plex docs say to pass something else. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts