Item example for C++ 5.0 and later
CLEADRasterImageListItem LEADItem;
long lCount,x,lSelCount;
m_LEADImageList.SelectAll(FALSE);
//set the 4th and 6th items as selected
LEADItem = m_LEADImageList.Item(3);
LEADItem.SetSelected (TRUE);
LEADItem = m_LEADImageList.Item(5);
LEADItem.SetSelected (TRUE);
//now, count the selected items
lCount = m_LEADImageList.GetCount();
lSelCount = 0;
for(x=0; x<lCount; x++)
{
LEADItem = m_LEADImageList.Item(x);
if(LEADItem.GetSelected())
lSelCount++;
}
CString csOut;
csOut.Format(TEXT("%ld Items were selected!"), lSelCount);
AfxMessageBox(csOut);