#include once "window9.bi"

Sub SetTextItemTreeView(ByVal gadget As Integer,ByVal item As Integer, ByVal sText As USTRING) Export
	Dim As TV_ITEM i
	#ifdef UNICODE
		i.pszText = cast(any ptr , *sText)
	#else	
		i.pszText = Cast(LPSTR,StrPtr(sText))
	#EndIf	
	i.cchTextMax=Len(sText)
	i.mask=TVIF_TEXT
	i.hItem=Cast(HTREEITEM,item)
	SendMessage(GadgetID(gadget),TVM_SETITEM,0,cast(LPARAM,@i))
End Sub
