03-21-2007, 01:02 PM
Hi G,
When I select a row in ListView...the first image goes blank....Following is the code I use to add a row :
Thx in advance
When I select a row in ListView...the first image goes blank....Following is the code I use to add a row :
/
function# hlv index lparam image image2 ~s [~s1] [~s2] [~s3] [~s4] [~s5] [~s6] [~s7] [~s8] [~s9]
Adds item to ListView32 control that has LVS_REPORT style and 1 to 10 columns.
if(index<0) index=0x7FFFFFFF
LVITEM lvi.mask=LVIF_IMAGE|LVIF_PARAM
lvi.iItem=index
lvi.pszText=""
lvi.lParam=lparam
lvi.iImage=image
index=SendMessage(hlv LVM_INSERTITEM 0 &lvi)
lvi.mask=LVIF_IMAGE
lvi.iItem=index
lvi.pszText=""
lvi.iSubItem=1
lvi.iImage=image2
SendMessage(hlv LVM_SETITEM index &lvi)
lvi.mask=LVIF_TEXT|LVIF_PARAM
int i; str* p=&s
for i 2 6
lvi.iItem=index
lvi.iSubItem=i
lvi.pszText=p[i]
SendMessage(hlv LVM_SETITEMTEXT index &lvi)
ret index
Thx in advance