USER32.DLL and LISTBOX
Posted: Mon Dec 20, 2004 9:31 pm
Can anyone give me the synthax of calling user32.dll which allows to retireve the text in a listbox controls
Thanks
Thanks
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
OpenWindow(0,0,0,400,400,#PB_Window_SystemMenu | #PB_Window_ScreenCentered,"Test")
CreateGadgetList(WindowID())
ListViewGadget(0,10,10,380,380)
AddGadgetItem(0,-1,"This is a line of text")
AddGadgetItem(0,-1,"This is another")
AddGadgetItem(0,-1,"And so on...")
listhandle=GadgetID(0) ;This needs to be the handle of your external listbox
listcount=SendMessage_(listhandle,#LB_GETCOUNT,0,0)
For temp=0 To listcount-1
length=SendMessage_(listhandle,#LB_GETTEXTLEN,temp,0)
tempstring$=Space(length)
SendMessage_(listhandle,#LB_GETTEXT,temp,@tempstring$)
string$=string$+" "+tempstring$
Next
Debug string$
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow