Skip to content
⌘ NSIS Forum Archive

CB_GETLBTEXT and string buffer pointers...

5 posts

Shorin#edited

CB_GETLBTEXT and string buffer pointers...

I'm having a problem getting individual indexed entries in a Combo Box in installoptions. I use the send message command like below, but $3 isn't changed to the string I was looking for. I beleive this is related to the lack of pointers in NSIS.

SendMessage $1 ${CB_GETLBTEXT} $0 "STR:$3" $4

$4, of course returns the size of the string returned. BUT $3 doesn't contain anything.
StrCpy $3 " "
SendMessage $1 ${CB_GETLBTEXT} $0 "STR:$3" $4
Also doesn't work. It doesn't "fill up" $3.

SendMessage $1 ${CB_GETLBTEXT} $0 "$3" $4
Makes $4 contain -1, which is error.

This message is really expecting a POINTER to a string buffer for $3. Is there something I can do to make this work? (short of writing an external C++ program?)
Shorin#
I made a work around for this problem, but I did not solve it. If only they had "points" here like exprts-exchnge... it's quite motivating
Shorin#
NEVER MIND!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This is a serious problem!!!!!!!!!!!!!!!

The same effect occurs with LB_GETTEXT !!
Now I CANNOT work around that in my installer!!!!

Someone please help!
galil#
If there is a specific reason to why you can't read what you need from INI file, using System plugin works:
System::Call 'user32::SendMessage(i r1, i ${CB_GETLBTEXT}, i r0, t .r3) i .r4'