|
|
#1 |
|
Junior Member
Join Date: Jul 2002
Posts: 4
|
SendMessage Usage
Where can I find all the available messages and their values? What are wparam and lparam? I found examples in the Winamp forum but I don't know what the different wparam and lparam values will do. How would I close a window once I have the HWND from FindWindow? SendMessage $R9 16 ? ?
From the docs: SendMessage HWND msg wparam lparam [user_var(return value)] ... Here are a few example messages and their values: * WM_CLOSE 16 * WM_COMMAND 273 * WM_USER 1024 |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Include WinMessages.NSH in your NSIS directory to your script and you will have them all defined.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2002
Posts: 4
|
Sorry, I don't know what you mean by this.
|
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Add this line:
!include "C:\Program Files\NSIS\WinMessages.nsh" At the top of your script. If you use NSIS 2.0a1 put this line: !include "C:\Program Files\NSIS\Examples\WinMessages.nsh" Then you will be able to use any windows message by its name. Example: FindWindow $0 "Winamp v1.x" SendMessage $0 ${WM_CLOSE} 0 0 NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2002
Posts: 4
|
Great. THANKS. But what are the wparam and lparam values for? What are they used for?
|
|
|
|
|
|
#6 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Every messages deals with its WPARAM and LPARAM differently. They are just two parameters for every message, like functions in C.
WM_CLOSE ignores them, so you can leave them both at 0. For more information on every message and its parameters go to MSDN and search for the message name. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jul 2002
Posts: 4
|
Thanks again and thanks for the fast response.
|
|
|
|
|
|
#8 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Glad I can help
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|