ImageList_SetImageCount

This function resizes an existing image list.

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 Values

Nonzero indicates success. Zero indicates failure.

Remarks

If you expand an image list using the ImageList_SetImageCount function, you must add new images by using the ImageList_Replace function. 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

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Commctrl.h   Commctrl.lib, Imgctl.lib

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

ImageList_Replace

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.