|
|
#1 |
|
Junior Member
Join Date: Jan 2005
Location: France - Paris
Posts: 7
|
I need to add some strings in a ComboBox.
I think to use the SendMessage to this, but the Windows event LB_ADDSTRING don't exist in WinMessages.nsh I added the following lignes in this file: !define LB_ADDSTRING 0x180 !define LB_INSERTSTRING 0x181 and I write the following code: ; [Get HWND current page of installation] FindWindow $hwnd "#32770" "" $HWNDPARENT ; [Disable Directory field] GetDlgItem $item $hwnd 1019 ; IDC_DIR SendMessage $item ${LB_ADDSTRING} "STR:line one" SendMessage $item ${LB_ADDSTRING} "STR:line two" SendMessage $item ${WM_SETTEXT} "STR:init value" and it's not work ! help, please. |
|
|
|
|
|
#2 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
If it's a combo box, you need to use CB_ADDSTRING not LB_ADDSTRING. In both cases, the string should be passed in lParam, not wParam as in your example.
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: Jan 2005
Location: France - Paris
Posts: 7
|
no change when I do:
SendMessage $item ${CB_ADDSTRING} 0 "STR:line one" SendMessage $item ${CB_ADDSTRING} 0 "STR:line two" NB: I'v added the CB_ADDSTRING in WinMessages.nsh !define CB_ADDSTRING 0x403 |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
CB_ADDSTRING is 0x0143 not 0x403. Additionally, it seems you're trying to use the message with a edit box, not a combo box. IDC_DIR is the id of the directory edit box.
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: Jan 2005
Location: France - Paris
Posts: 7
|
OK!
Precisely, I changes the IDC_DIR edit box by a combo box. Thank you. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|