I understand that I can attach a 4 byte tag to any item of a listbox using
the API calls LB_SETITEMDATA and LB_GETITEMDATA. This is of course sort of
useful for holding all sorts of neat information related to the individual
items in the listbox. My problem is that I'm having trouble getting it to
work with sendmessage… Can anyone give me a 2 or 3 liner showing how this
is done?
Thanks
Rob
Hi Rob,
I haven't tried this but looking in the manual, I would try:
Declare Function SendMessage…etc
Declare Function GetFocus…etc
Const LB_SETITEMDATA = &H400 + 27
Const LB_GETITEMDATA = &H400 + 26
List1.SetFocus
ListHnd% = GetFocus()
APIError% = SendMessage(ListHnd%,LBS_SETITEMDATA,14,23)
where I was trying to place '23' in the 14th index
Value& = SendMessage(ListHnd%, LB_GETITEMDATA, 14,0&)
where Value will equal the 23 in the 14th place.
If you can't get the declare's right, leet me know.
Don Funk