#include once "window9.bi"

Function GetTextItemListView(ByVal gadget As Integer,ByVal Item As Integer,ByVal SubItem_ As Integer) As string Export
	Dim buf As String*256
	Dim LV As LVITEM
	LV.iSubItem=SubItem_
	LV.pszText= Cast(LPSTR,@buf)
	LV.cchTextMax=256
	If GetClassName_(GadgetID(gadget)) = "ExplorerGadget" Then
		SendMessage(GetProp(GadgetID(gadget),"EXPLORERGADGETLISTVIEWWINDOW"),4096+45,Item,Cast(lparam,@LV))
	Else
		SendMessage(GadgetID(gadget),4096+45,Item,Cast(lparam,@LV))
	EndIf
	Return buf
End Function
