Problem with SendMessage API call

BlitzPlus Forums/BlitzPlus Programming/Problem with SendMessage API call

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Mmm .. I tried it with QueryObject() and it still fails:

Const LB_GETCOUNT=$18b

width=400 ; Window client width 
height=300 ; Window client height 
gap=20 ; Gap between gadgets 
hwin=CreateWindow("Testing",100,50,width,height,0,33) 
lbox=CreateListBox(gap,gap,width-gap*2,height-gap*2,hwin) 

For d=1 To 5
	AddGadgetItem lbox,"Line "+d
Next

i=SendMessage(QueryObject(lbox,1),LB_GETCOUNT,0,0)
AddGadgetItem lbox,"Count = "+Str$(i)

WaitEvent
End


For more listbox information have you looked at MSDN Library - ListBoxes ?