CImageList::Add

int Add( CBitmap* pbmImage, CBitmap* pbmMask );

int Add( CBitmap* pbmImage, COLORREF crMask );

int Add( HICON hIcon );

Return Value

Zero-based index of the first new image if successful; otherwise  – 1.

Parameters

pbmImage

Pointer to the bitmap containing the image or images. The number of images is inferred from the width of the bitmap.

pbmMask

Pointer to the bitmap containing the mask. If no mask is used with the image list, this parameter is ignored.

crMask

Color used to generate the mask. Each pixel of this color in the given bitmap is changed to black and the corresponding bit in the mask is set to one.

hIcon

Handle of the icon that contains the bitmap and mask for the new image.

Remarks

Call this function to add one or more images or an icon to an image list.

CImageList OverviewClass MembersHierarchy Chart

See Also   CImageList::Remove, CImageList::Replace, COLORREF