ImageList_SetOverlayImage function

Adds a specified image to the list of images to be used as overlay masks. An image list can have up to four overlay masks in version 4.70 and earlier and up to 15 in version 4.71. The function assigns an overlay mask index to the specified image.

Syntax

BOOL ImageList_SetOverlayImage(
  HIMAGELIST himl,
  int        iImage,
  int        iOverlay
);

Parameters

himl

Type: HIMAGELIST

A handle to the image list.

iImage

Type: int

The zero-based index of an image in the himl image list. This index identifies the image to use as an overlay mask.

iOverlay

Type: int

The one-based index of the overlay mask.

Return Value

Type: BOOL

Returns nonzero if successful, or zero otherwise.

Remarks

An overlay mask is an image drawn transparently over another image. To draw an overlay mask over an image, call the ImageList_Draw or ImageList_DrawEx function. The fStyle parameter of these functions can use the INDEXTOOVERLAYMASK macro to specify an overlay mask index.

A call to this method fails and returns E_INVALIDARG unless the image list is created using a mask.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h
Library Comctl32.lib
DLL Comctl32.dll