ImageList_Create function (commctrl.h)

Creates a new image list.

Syntax

HIMAGELIST ImageList_Create(
  int  cx,
  int  cy,
  UINT flags,
  int  cInitial,
  int  cGrow
);

Parameters

cx

Type: int

The width, in pixels, of each image.

cy

Type: int

The height, in pixels, of each image.

flags

Type: UINT

A set of bit flags that specify the type of image list to create. This parameter can be a combination of the Image List Creation Flags.

cInitial

Type: int

The number of images that the image list initially contains.

cGrow

Type: int

The number of images by which the image list can grow when the system needs to make room for new images. This parameter represents the number of new images that the resized image list can contain.

Return value

Type: HIMAGELIST

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

Remarks

When you finish using the image list, destroy it by calling the ImageList_Destroy function.

Note  Comctl32.dll version 6 is not redistributable but it is included in Windows or later. To use Comctl32.dll version 6, specify it in a 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 commctrl.h
Library Comctl32.lib
DLL Comctl32.dll
API set ext-ms-win-shell-comctl32-init-l1-1-1 (introduced in Windows 10, version 10.0.14393)