This is what I found specific to reading the ventrilo treeview: clicky here
This is something I've found specifically regarding PB code taking to TreeViews: Clicky here
However, the wrapper seems to be using some kind of pointer to a cTreeViewOBJ, whereas I am trying to pass it a window handle.
Here's my code if anyone is interested:
Code: Select all
IncludeFile "ooptreeview.pbi"
#MAX_TEXT_LENGTH = 100
Procedure ExtractTreeData(hwndTreeView)
hCurrentItem.l
hPrevItem.l
treeitem.TVITEM
blah.c
hCurrentItem = TreeView_GetFirstVisible(hwndTreeView)
If hCurrentItem = #Null
ProcedureReturn #False
EndIf
While hPrevItem <> hCurrentItem
FreeMemory(@treeitem)
treeitem\mask = #TVIF_IMAGE | #TVIF_TEXT
treeitem\hItem = hCurrentItem
treeitem\cchTextMax = 100
treeitem\pszText = tmptext
TreeView_GetItem(hwndTreeView, @treeitem)
;-----------------------------------------
;insert code here
;treeitem\pszText is the text
;treeitem\iImage is the icon index
;Other fields are undefinded due to .mask
MessageBox_(hwndMain, treeitem\pszText, "text", 0)
hPrevItem = hCurrentItem
hCurrentItem = TreeView_GetNextVisible(hwndTreeView, hCurrentItem)
Wend
ProcedureReturn #True
EndProcedure
ventText.s = Space(255)
VentriloHWND = FindWindow_(#Null, "Ventrilo")
Debug "VentriloHWND = " + Str(VentriloHWND)
ventTextLen = GetWindowText_(VentriloHWND, @ventText, 255)
Debug "Length = " + Str(ventTextLen)
Debug "Text = " + ventText
ventTreeHWND = FindWindowEx_(VentriloHWND, 0, "SysTreeView32", "Tree2")
Debug "Vent Tree HWND = " + Str(ventTreeHWND)