Old 23rd November 2009, 10:26   #1
Krasnoff64
Junior Member
 
Join Date: Nov 2009
Posts: 1
Hy there, I had the same problem. I have solved it by using messages, such as CB_GETCURSEL & CB_GETLBTEXT.
Here is a full text:

code:

Var hCombo
Var PrevIdx

Function OnComboChange
SendMessage $hCombo ${CB_GETCURSEL} 0 0 $0
${If} $PrevIdx == $0
${NSD_GetText} $hCombo $2
${Else}
System::Alloc 64
Pop $1
SendMessage $hCombo ${CB_GETLBTEXT} $0 $1
System::Call "*$1(&t32.r2)"
System::Free $1
${EndIf}
StrCpy $PrevIdx $0
MessageBox MB_OK $2
FunctionEnd

Function Create

; ...

${NSD_CreateComboBox} 75% 85% 20% 20 ""
Pop $hCombo
${NSD_CB_AddString} $hCombo "x"
${NSD_CB_AddString} $hCombo "y"
SendMessage $hCombo ${CB_GETCURSEL} 0 0 $PrevIdx
${NSD_OnChange} $hCombo OnComboChange

; ...

FunctionEnd


Krasnoff64 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