xilay
31st August 2005 15:23 UTC
SendMessage, DropList and settext
Hello,
I want to have a blank in a dropList, I try to use SendMessage but nothing changes.
This is my code :
GetDlgItem $1 $hwnd 1202
SendMessage $1 ${CB_SETTEXT} 0 "STR:"
Have you got an idea?
Thanks
PS:Sorry, I can't change the subject, it's not combobox but droplist
Joel
31st August 2005 17:12 UTC
What do you mean like a blank? Do you mean like space between strings?
xilay
31st August 2005 21:21 UTC
Yes, in my dropList, the first line is a space. The user can choose an other line and with a button "clear", he can clear all controls and I would like the dropList with the first line. I hope you understand me, I must use more my english so for the moment, it's a little hard for me to explain :(
Thanks
Joel
1st September 2005 04:11 UTC
Well... I suposse to insert blank lines in droplist...
!define CB_INSERTSTRING 0x014A
GetDlgItem$1 $hwnd 1202
SendMessage$1 ${CB_INSERTSTRING} 0 ""
>SendMessage $1 ${CB_INSERTSTRING} 1 "Line1"
>SendMessage $1 ${CB_INSERTSTRING} 2 ""
>SendMessage $1 ${CB_INSERTSTRING} 3 "Line2"
Warning: Didn't test the code with NSIS syntax
xilay
1st September 2005 07:36 UTC
Thanks but I have a memory problem when I use this code...
And I think I wasn't be good in my explanations.
This is my dropList :
- blank
- line1
- line2
The user chose the line2 so he can see the dropList with line2.
With a 'clear' button, he can reset all controls so, I would like the user see the dropList with blank.
Thanks
xilay
1st September 2005 09:19 UTC
Thanks to Joel, he drived me in the good way.
I need CB_SETCURSEL in my SendMessage, and now, it's perfect :up:
Joel
1st September 2005 21:14 UTC
Oh..you wanted a pre-selected option? :D