I am trying to get information on a ListViewItem of a ListView control which hWnd is known!
Especially I want to retrieve the Icons index number of the used ImageList.
I tried this way:
Public Type LV_ITEM
mask As Long
iItem As Long
iSubItem As Long
state As Long
stateMask As Long
pszText As Long (Also tried "as String" here)
cchTextMax As Long
iImage As Long
lParam As Long
iIndent As Long
========END OF DECLARATION SECTION========
dim myItem as LV_ITEM
myItem.iItem = 1
myItem.iSubItem = 0
myItem.mask = LVIF_IMAGE of LVIF_TEXT
SendMessage hWnd, LVM_GETITEM, 0&, myItem
==========END OF CODE SECTION=====================
But nothing happens with my myItem-Structure... And I have no idea why...
The hWnd is correct. I already tried to send e.g. LVM_DELTEALLITEMS message to the control and all items became deleted... So I think something with the LVM_GETITEM message is wrong... Maybe the LV_ITEM is defined wrong?!
Any ideas from you?