#include once "window9.bi"

Function GetTextTreeView(ByVal gadget As Integer, ByVal item As Integer) As String Export
  Dim TV_ITEM_ As TV_ITEM
  Dim As String*256 Buf
  TV_ITEM_.pszText=Cast(LPSTR,StrPtr(Buf))
  TV_ITEM_.cchTextMax=256
  TV_ITEM_.mask=TVIF_TEXT
  TV_ITEM_.hItem=Cast(HTREEITEM,item)
  SendMessage(GadgetID(gadget),TVM_GETITEM,0,cast(LPARAM,@TV_ITEM_))
  Return  buf
End Function
