Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This 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. The function assigns an overlay mask index to the specified image.

Syntax

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

Parameters

himl

[in] Handle to the image list.

iImage

[in] Zero-based index of an image in the himlimage list. This index identifies the image to use as an overlay mask.

iOverlay

[in] One-based index of the overlay mask.

Return Value

Nonzero indicates success. Zero indicates failure.

Remarks

An overlay mask is an image drawn transparently over another image. To draw an overlay mask over an image, call the ImageList_Drawor ImageList_DrawExfunction. The fStyleparameter of these functions can use the INDEXTOOVERLAYMASKmacro to specify an overlay mask index.

Requirements

Header commctrl.h
Library commctrl.lib, Imgctl.lib
Windows Embedded CE Windows CE 1.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also