'treeview lparam itemdata
'   返回指定项的 lParam
'   hWndControl: 控件的句柄 (例如  HWND_FORM1_TREEVIEW1)   
'   hItem:       The handle of the item to set the lParam for.
'   Returns:     The 32-bit lParam value for this item.
Function FF_TreeView_GetlParam (ByVal hWndControl as HWnd, _
                                ByVal hItem as HANDLE) as Integer

    Dim ti as TV_ITEM

    '检查窗口句柄是否有效
    If IsWindow(hWndControl) Then  
  
       ti.hItem = hItem                                                 
       ti.mask  = TVIF_HANDLE Or TVIF_PARAM  
       
       TreeView_GetItem(hWndControl, VarPtr(ti))
  
       Function = ti.lParam  
    End If
    
End Function

