ImageList_ReplaceIconImageList_ReplaceIcon*
*Contents  *Index  *Topic Contents
*Previous Topic: ImageList_Replace
*Next Topic: ImageList_SetBkColor

ImageList_ReplaceIcon


int ImageList_ReplaceIcon(
    HIMAGELIST himl, 	
    int i, 	
    HICON hicon	
   );	

Replaces an image with an icon or cursor.

himl
Handle to the image list.
i
Index of the image to replace. If i is -1, the function appends the image to the end of the list.
hicon
Handle to the icon or cursor that contains the bitmap and mask for the new image.

Because the system does not save hicon, you can destroy it after the function returns if the icon or cursor was created by the CreateIcon function. You do not need to destroy hicon if it was loaded by the LoadIcon function; the system automatically frees an icon resource when it is no longer needed.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.