Creates a new image list.
Syntax
HIMAGELIST ImageList_Create( int cx, int cy, UINT flags, int cInitial, int cGrow );
Parameters
cx The width, in pixels, of each image. cy The height, in pixels, of each image. flags A set of bit flags that specify the type of image list to create. This parameter can be a combination of the following values, but it can include only one of the ILC_COLOR values. ILC_COLORUse the default behavior if none of the other ILC_COLOR* flags is specified. Typically, the default is ILC_COLOR4, but for older display drivers, the default is ILC_COLORDDB.ILC_COLOR4Use a 4-bit (16-color) device-independent bitmap (DIB) section as the bitmap for the image list. ILC_COLOR8Use an 8-bit DIB section. The colors used for the color table are the same colors as the halftone palette. ILC_COLOR16Use a 16-bit (32/64k-color) DIB section.ILC_COLOR24Use a 24-bit DIB section.ILC_COLOR32Use a 32-bit DIB section.ILC_COLORDDBUse a device-dependent bitmap.ILC_MASKUse a mask. The image list contains two bitmaps, one of which is a monochrome bitmap used as a mask. If this value is not included, the image list contains only one bitmap.ILC_MIRRORVersion 6.00. Microsoft Windows can be mirrored to display languages such as Hebrew or Arabic that read right-to-left. If the image list is created on a mirrored version of Windows, then the images in the lists are mirrored, that is, they are flipped so they display from right to left. Use this flag on a mirrored version of Windows to instruct the image list not to automatically mirror images. ILC_PERITEMMIRRORVersion 6.00. Specify this flag if ILC_MIRROR is used on an image list that contains a strip of images. ILC_MIRROR must be specified for this flag to have any effect. cInitial The number of images that the image list initially contains.cGrow 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.
ILC_COLOR
ILC_COLOR4
ILC_COLOR8
ILC_COLOR16
ILC_COLOR24
ILC_COLOR32
ILC_COLORDDB
ILC_MASK
ILC_MIRROR
ILC_PERITEMMIRROR
Return Value
Returns the handle to the image list if successful, or NULL otherwise.
Remarks
Note Comctl32.dll version 6 is not redistributable but it is included in Windows XP or later. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Enabling Visual Styles.
Function Information
Minimum DLL Versioncomctl32.dllHeadercommctrl.hImport librarycomctl32.libMinimum operating systems Windows NT 3.51, Windows 95