Page 2 of 2

Re: LBEX - some functions for ListBoxes

Posted: 19 Aug 2020, 04:35
by just me
Hi A_AhkUser

thanks for reporting. It's a typical copy&paste error and will be corrected soon.

Re: LBEX - some functions for ListBoxes

Posted: 15 May 2021, 13:42
by iilabs
Joe Glines wrote:
14 Jan 2016, 21:42
Nice functionality... I don't do much with ListBoxes so I wrote a short example playing with a few of the functions. I don't normally use a handle so I thought I'd go ahead and post my simple example here for others that aren't used to it either.

Code: Select all

Gui, Add, ListBox, +HwndHLB vColorChoice h100 w100, Green||Blue
gui, show 
Count:=LBEX_GetCount(HLB)
Sleep, 1000
LBEX_Add(HLB, "Added to " count " items")
    Sleep, 1000
LBEX_DeleteAll(HLB)
Sleep, 1000
LBEX_Add(HLB, "Added this back")
Thank you for this example!

Re: LBEX - some functions for ListBoxes

Posted: 20 Nov 2021, 11:01
by c7aesa7r
@just me
Im using this code to get the text of a specific listbox item, would like to ask if you know how to also get this item lparam

Code: Select all

SendMessage, 0x018A, %Item%, 0, , ahk_id %HWND% ; LB_GETTEXTLEN
VarSetCapacity(Txt, ErrorLevel << !!A_IsUnicode, 0)
 SendMessage, 0x0189, %Item%, % &Txt, , ahk_id %HWND% ; LB_GETTEXT
VarSetCapacity(Txt, -1)

Re: LBEX - some functions for ListBoxes

Posted: 21 Nov 2021, 04:25
by just me

Code: Select all

LBEX_GetData()
if it has data.