|
|
|
|
#1 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
WM_CLOSE opposite?
I want to hide a control and then show it later during installation progress.
I've found WM_CLOSE 0x10 will hide it, but it completely terminates it so I cannot get it back again! -Stu |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Use ShowWindow. It can both show and hide.
NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Ah thanks, I have no idea how I forgot about that!
-Stu |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Here's another WM question...
How can I dynamically select/unselect items in a listbox control. -Stu |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Mar 2004
Posts: 138
|
!define CB_GETCURSEL 0x0147
!define CB_SETCURSEL 0x014E GetDlgItem $0 $HWND 1201 SendMessage $0 ${CB_GETCURSEL} -1 0 $1 GetDlgItem $0 $HWND 1202 SendMessage $0 ${CB_SETCURSEL} $1 0 |
|
|
|
|
|
#6 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
SendMessage doesn't seem to work very well for NOTIFY events (on page leave).
You can use it to change strings, but for anything else it doesn't work correctly. When I'd try to change the colour of a control, it would only change once you had set focus on it (ie background colours for combo boxes.) Due to this, I couldn't get select all working either (had no effect whatsoever). I'm going to try InstallOptionsEx now. -Stu |
|
|
|
|
|
#7 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
Never mind. I should have did a bit of my own research.
The CB_GETCURSEL is not the right Message - It's for ComboBox's. I specifically said ListBox's. The correct Message I found was LB_SELITEMRANGEEX (0x0183) and it works perfectly now. Edit: And LB_SETSEL (0x0185) can be used to select none... SendMessage $R0 ${LB_SETSEL} 0 -1 -Stu |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|