不是LVITEM结构中有iImage成员,是放ImageList中的图片序号的(从0开始),用GetItem取得LVITEM结构,重设一下iImage成员,再SetItem就可以了。
还有一种方法,可以用SetImageList重把ImageList重设为一个包含同样数目的不同图片的ImageList,再刷新就可以了,注意SetImageList返回原来的ImageList的句柄,要自己清除他。

解决方案 »

  1.   

    The image for an item can be set when an item is first added to the list view control. 
    m_listctrl.InsertItem( LVIF_TEXT | LVIF_IMAGE, nRow, sItemText, 0, 0, nImage, NULL);
    The image can later be changed by calling the SetItem() function. The CListCtrl class does not have a SetImage() function. 
    m_listctrl.SetItem( 0, 0, LVIF_IMAGE, NULL, nImage, 0, 0, 0 );
    To remove the image, use a value of -1 for nImage, else nImage should be a zero based index of the image in the image list.