IImageList::SetBkColor method (commoncontrols.h)
Sets the background color for an image list. This method only functions if you add an icon to the image list or use the IImageList::AddMasked method to add a black and white bitmap. Without a mask, the entire image draws, and the background color is not visible.
Syntax
HRESULT SetBkColor(
[in] COLORREF clrBk,
[out] COLORREF *pclr
);
Parameters
[in] clrBk
Type: COLORREF
The background color to set. If this parameter is set to CLR_NONE, then images draw transparently using the mask.
[out] pclr
Type: COLORREF*
A pointer to a COLORREF that contains the previous background color on return if successful, or CLR_NONE otherwise.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
To use IImageList::SetBkColor, specify Comctl32.dll version 6 in the manifest. For more information on manifests, see Enabling Visual Styles.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | commoncontrols.h |
DLL | Comctl32.dll (version 6.0 or later) |