iItem
Index of the list view item.
pitem
Address of an LVITEM structure. The iSubItem member specifies the index of a subitem, or it can be zero to get the item label. The pszText member points to a buffer that receives the text, and the cchTextMax member specifies the size of the buffer. [/Quote]
设置好的 iSubItem 就可以得到对应列的文本。
向ListBox发送LB_GETITEMDATA消息
LB_GETITEMDATA
An application sends an LB_GETITEMDATA message to retrieve the application-defined 32-bit value associated with the specified list box item.
LB_GETITEMDATA
wParam = (WPARAM) index; // item index
lParam = 0; // not used; must be zero
大致找了一下ListView的API.
Public Sub ListView_GetItemText(hwndLV As Long, i As Long, iSubItem As Long, pszText As Long, cchTextMax As Long)
Dim lvi As LVITEM
lvi.iSubItem = iSubItem
lvi.cchTextMax = cchTextMax
lvi.pszText = pszText
SendMessage hwndLV, LVM_GETITEMTEXT, ByVal i, lvi
pszText = lvi.pszText
End Sub