Here is a treeview example wich is 99.9% the same as the earlier tv post.
I just build'd it, could not resist to post..
Code:
Function TV_GetItemStr( ByVal hWnd As Long, ByVal hItem As Long ) As String Dim a As Long Dim tvItem As TV_ITEM Dim Buffer As String * 2000 tvItem.Mask = %TVIF_TEXT tvItem.hItem = hItem tvItem.pszText = VarPtr( Buffer ) tvItem.cchTextMax = Len( Buffer ) a = SendMessage( hWnd, %TVM_GETITEM, 0, ByVal VarPtr( tvItem ) ) If a > 0 Then a = Instr( Buffer, Chr$( 0 ) ) If a > 0 Then Function = Left$( Buffer, a - 1 ) End If End Function
------------------
Leave a comment: