'listview lparam itemdata
'   设置可以与 ListView 项关联的 32 位值。
'   hWndControl:  控件的句柄 (例如  HWND_FORM1_LISTVIEW1)   
'   iRow:         要设置的从零开始的行。
'   iColumn:      要设置从零开始的列。
'   lParam:       A 32-bit value to be stored with the item. 
'   Returns:      %TRUE if successful, %FALSE if otherwise.
Function FF_ListView_SetItemlParam(ByVal hWndControl as HWnd, ByVal iRow as Long, ByVal iColumn as Long, ByVal lParam as Long) as Integer
   
   Dim tlv_item as LV_ITEM
   
   '检查窗口句柄是否有效
   If IsWindow(hWndControl) Then
      tlv_item.mask = LVIF_PARAM
      tlv_item.iItem = iRow
      tlv_item.iSubItem = iColumn
      tlv_item.lParam = lParam
      
      Function = SendMessage(hWndControl, LVM_SETITEM, 0, Cast(LPARAM, VarPtr(tlv_item)))
      
   End If
   
End Function

