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 resizes an existing image list.

Syntax

BOOL ImageList_SetImageCount(
  HIMAGELIST 
himl, 
  UINT 
uNewCount 
);

Parameters

himl

[in] Handle to the image list that is resized.

uNewCount

[in] Value specifying the new size of the image list.

Return Value

Nonzero indicates success. Zero indicates failure.

Remarks

If you expand an image list using the ImageList_SetImageCountfunction, you must add new images by using the ImageList_Replacefunction. If you do not add valid images at the new indexes, draw operations that use the new indexes will be unpredictable.

If you decrease the size of an image list by using this function, the truncated images are freed.

Requirements

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

See Also