'listview text
'   检索列表视图项的文本。
'   hWndControl:  控件的句柄 (例如  HWND_FORM1_LISTVIEW1)   
'   iRow:         要检索的从零开始的行。
'   iColumn:      要检索的从零开始的列。
'   Returns:      Returns the item's text.
Function FF_ListView_GetItemText(ByVal hWndControl as HWnd, ByVal iRow as Long, ByVal iColumn as Long) as CWSTR
   
   Dim tlv_item as LV_ITEMW
   Dim zText as wString * MAX_PATH
   
   '检查窗口句柄是否有效
   If IsWindow(hWndControl) Then
      tlv_item.mask = LVIF_TEXT
      tlv_item.iItem = iRow
      tlv_item.iSubItem = iColumn
      tlv_item.pszText = VarPtr(zText)
      tlv_item.cchTextMax = SizeOf(zText)
      
      If SendMessageW(hWndControl, LVM_GETITEMW, 0, Cast(LPARAM, VarPtr(tlv_item))) Then
         Return zText
      End If
      
   End If
      Return ""

End Function

