SendMessage problems
Hello!
I have this strange problem.
I use FindWindow to find the program and SendMessage to send it a WM_QUIT message, but it didn't work. WM_CLOSE works fine, but my program minimizes on close message (it is designed so). Simple Delphi code works just like it should.
Here are snippets of my code:
.............
Section ""
FindWindow $R1 "PClass" "Program Name"
SendMessage $R1 18 0 0
SetOutPath "$INSTDIR"
.............
18 is WM_QUIT equal.
Simple MESSAGEBOX shows that FindWindow really found the program handle.
Here is the Delphi code that works:
.............
hwnd := FindWindow('PClass','Program Name');
If Hwnd <> 0 Then PostMessage(hwnd, 18, 0, 0);
.............
Where I do mistake? Does SendMessage really send all messages or some of them? Or is this a bug?
Regards,
Nikolai Tsvetkov