Old 25th September 2004, 17:34   #1
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 25th September 2004, 17:40   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
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
kichik is offline   Reply With Quote
Old 25th September 2004, 20:43   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ah thanks, I have no idea how I forgot about that!

-Stu
Afrow UK is offline   Reply With Quote
Old 27th September 2004, 18:27   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 28th September 2004, 00:03   #5
bluenet
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
bluenet is offline   Reply With Quote
Old 28th September 2004, 20:05   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Old 28th September 2004, 20:28   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
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
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump