Iterating through CListCtrl
-
Hi All, I would like to iterate through every item in a list control and change each item's icon based on a time criteria. I have tried GetItem() but I haven't been able to use it correctly (the documentation is very vague) as I only get an empty structure back even though I put the index I am after in iItem. Could someone please help me out here? Cheers, Clint
-
Hi All, I would like to iterate through every item in a list control and change each item's icon based on a time criteria. I have tried GetItem() but I haven't been able to use it correctly (the documentation is very vague) as I only get an empty structure back even though I put the index I am after in iItem. Could someone please help me out here? Cheers, Clint
Before calling GetItem(), you need to set the mask member of your structure with the flags (or'ed together) for the element values that you want to retrieve. struct LVITEM sItem; sItem.mask = LVIF_IMAGE | LVIF_PARAM | ... whatever else you want... m_oMyListCtrl.GetItem(&sItem); onwards and upwards...