Prev Previous Post   Next Post Next
Old 27th December 2009, 03:22   #1
dougcvc
Junior Member
 
Join Date: May 2009
Posts: 16
CB_FINDSTRING using SendMessage problem

Hello,
I am having trouble searching for a string in a combobox using winmessages.nsh
I must be doing something wrong because every time it just returns -1. I am not sure where i am going wrong. Here is some code to try it on...

code:

Name test
OutFile test.exe
XPStyle on
!include nsDialogs.nsh
!include "WinMessages.nsh"
Page custom GUI
Page instfiles


var /global testbutton
var /global COMBOBOX


Function GUI

nsDialogs::Create 1018


${NSD_CreateButton} 0 190 30% 12u "test button"
pop $testbutton
${NSD_OnClick} $testbutton testbutton


${NSD_CreateComboBox} 0 30 80% 12u "test"
pop $COMBOBOX
${NSD_CB_AddString} $COMBOBOX "test"
${NSD_CB_SelectString} $COMBOBOX "test"

nsDialogs::Show
FunctionEnd


Function testbutton

StrCpy $R0 "test"
SendMessage $COMBOBOX ${CB_FINDSTRING} -1 $R0 $1
messagebox mb_ok "$1"

FunctionEnd

Section ""
SectionEnd



Many thanks if you have any help!
dougcvc is offline   Reply With Quote
 
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