This returns the text for a tree item having handle hItem -
Code:
function TVW_GetText( byval hTree as long, byval hItem as long ) as string 'Purpose : Returns the item's text ; if the item is not found, returns "" ' 'Remarks : Allows max of 255 characters for tree item text ' local ti as TV_ITEM local zText as asciiz * 256 local s as string 'Set up the tree item structure for our purpose... ti.hItem = hItem ti.mask = %TVIF_TEXT zText = space$( 255 ) ti.cchTextMax = 256 ti.pszText = varptr( zText ) 'Query the tree... if TreeView_GetItem( hTree, ti ) = 0 then 'call failed function = "" else s = zText function = s end if end function
by Richard J Simon, ISBN 1-57169-010-7. Also, you can download the free TinyHelp
project from my web site which contains lots of useful treeview code.
Regards,
Paul
------------------
http://www.zippety.net
mailto

Leave a comment: