Compartilhar via


CImageList::Remove

Call this function to remove an image from an image list object.

BOOL Remove( 
   int nImage  
);

Parameters

  • nImage
    Zero-based index of the image to remove.

Return Value

Nonzero if successful; otherwise 0.

Remarks

All items following nImage now move down one position. For example, if an image list contains two items, deleting the first item will cause the remaining item to now be in the first position. nImage=0 for the item in the first position.

Example

// Remove every other image from the image list. 
for (int i = 0; i < m_myImageList.GetImageCount(); i++)
{
   m_myImageList.Remove(i);
}

Requirements

Header: afxcmn.h

See Also

Reference

CImageList Class

Hierarchy Chart

CImageList::DeleteImageList