#Include once "window9.bi"

Function RenameItemTreeView(ByVal gadget As Integer,ByVal item As Integer, ByVal String_ As String)As Integer Export
  Dim TV_ITEM_ As TV_ITEM
  TV_ITEM_.pszText=Cast(LPSTR,StrPtr(string_))
  TV_ITEM_.cchTextMax=Len(String_)
  TV_ITEM_.mask=TVIF_TEXT
  TV_ITEM_.hItem=Cast(HTREEITEM,item)
  Return  SendMessage(GadgetID(gadget),TVM_SETITEM,0,cast(LPARAM,@TV_ITEM_))
End Function
