phealy
9th January 2003 22:02 UTC
sending messages to other windows
I need to be able to send another app a message to make it quit, but all my efforts with FindWindow and SendMessage have failed. I'm including WinMessages.nsh, and it does find the handle, and it returns from that call, but the other app doesn't seem to receive the message.
Thanks.
kichik
9th January 2003 22:12 UTC
Every application handles messages in his own way. If you have tried the basic WM_CLOSE and WM_DESTROY and they both didn't work you will have to ask the application author how to close it using messages. WM_CLOSE and WM_DESTROY are a guess in this case, there is no safe generic way to make an application quit (you can always use TerminateProcess but that's very unsafe).
phealy
9th January 2003 23:02 UTC
sorry, didn't make myself clear. I'm not sure on the syntax for FindWindow and SendMessage. If you could do me a favor and gimme an example, i'd greatly appreciate it.
thanks.
kichik
10th January 2003 11:43 UTC
There is a good example in here:
http://forums.winamp.com/showthread....ow+SendMessage
phealy
10th January 2003 12:54 UTC
thanks, this worked perfectly. :D
I was able to put them in with no problem.
virtlink
12th January 2003 10:12 UTC
KiCHiK, that piece of code you pointed to is not yet in the archive. Someone should add it since I'm sure that someone needs this code in the future again.
Sunjammer
12th January 2003 12:30 UTC
VirtLink, you could add such a page to the archive yourself, save KiCHiK having to do everything :)