IImageList::ImageListSetStrip

[This is preliminary documentation and subject to change.]

Enables a user to add a strip of icons to the image list, starting at the location identified by nLoc using a pair of bitmaps (large and small icons).

HRESULT ImageListSetStrip(
  long * pBMapSm, // Point to a handle
  long * pBMapLg, // Pointer to a handle
  long nStartLoc, // Index of the first image in the strip
  COLORREF cMask  // Color of the icon mask
);
 

Parameters

pBMapSm
[in] Pointer to the Win32 HBITMAP handle of the small (16x16) icon image strip.
pBMapLg
[in] Pointer to the Win32 HBITMAP handle of the large (32x32) icon image strip.
nStartLoc
[in] Specifies the index assigned to the first image in the strip. This is a virtual index that is internally mapped to the actual index.
cMask
[in] Specifies the color used to generate a mask.

Return Values

S_OK
The strip of icons was successfully added to or replaced.
E_INVALIDARG
The pBMapSm or pBMLg parameter is NULL or references bitmaps of an invalid size or nStartLoc is negative.
E_UNEXPECTED
An unexpected error occurred.

Remarks

The small and large bitmaps must be given and the number of icons in each strip must be equal. The small bitmap must be 16 pixels high and 16*n wide. The large bitmap must be 32 pixels high and 32*n pixels wide.

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

See Also

IImageList