Share via


CImageList::SetBkColor

Call this function to set the background color for an image list.

COLORREF SetBkColor( 
   COLORREF cr  
);

Parameters

  • cr
    Background color to set. It can be CLR_NONE. In that case, images are drawn transparently using the mask.

Return Value

The previous background color if successful; otherwise CLR_NONE.

Example

// Set the background color to white.
m_myImageList.SetBkColor(RGB(255, 255, 255));
ASSERT(m_myImageList.GetBkColor() == RGB(255, 255, 255));

Requirements

Header: afxcmn.h

See Also

Reference

CImageList Class

Hierarchy Chart

CImageList::GetBkColor

COLORREF

Other Resources

CImageList Members