The ListView_ItemSetStateImage() function sets the state image associated with the specified list view item.
ListView_ItemSetStateImage(list_view_field, item_index, image)
• list_view_field – The list view field containing the specified item.
• item_index – A long integer specifying the list view item whose state image is being set.
• image – An integer specifying the image to use. The value corresponds to the item number of a state image listed in the ListView Images window. If no image will be displayed, use the LV_NOIMAGE constant.
An integer containing the item number of the previous state image for the specified list view item. If no state image was associated with the list view item, the constant LV_NOIMAGE is returned.