ImageList_Merge function (commctrl.h)

Creates a new image by combining two existing images. The function also creates a new image list in which to store the image.

Syntax

HIMAGELIST ImageList_Merge(
  HIMAGELIST himl1,
  int        i1,
  HIMAGELIST himl2,
  int        i2,
  int        dx,
  int        dy
);

Parameters

himl1

Type: HIMAGELIST

A handle to the first image list.

i1

Type: int

The index of the first existing image.

himl2

Type: HIMAGELIST

A handle to the second image list.

i2

Type: int

The index of the second existing image.

dx

Type: int

The x-offset of the second image relative to the first image.

dy

Type: int

The y-offset of the second image relative to the first image.

Return value

Type: HIMAGELIST

Returns the handle to the new image list if successful, or NULL otherwise.

Remarks

The new image consists of the second existing image drawn transparently over the first. The mask for the new image is the result of performing a logical OR operation on the masks of the two existing images.

Requirements

Requirement Value
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