#include once "window9.bi"

Sub SetTextItemListView(ByVal gadget   As Long, _
							ByVal Item_    As Long, _
							ByVal SubItem_ As Long, _
							ByRef txt      As USTRING) Export
	dim ListViewItem As LVITEM
	with ListViewItem
		.iSubItem   = SubItem_
		#ifdef UNICODE
			.pszText    = cast(any ptr , *txt)
		#else	
			.pszText    = StrPtr(txt)
		#EndIf
		.cchTextMax = Len(txt)
	end with
	SendMessage(GadgetID( gadget),4096+46,CInt(Item_) ,Cast(LPARAM,@ListViewItem))
End Sub
