ImageList_ExtractIcon macro (commctrl.h)

Calls the ImageList_GetIcon function to create an icon or cursor based on an image and mask in an image list.

Syntax

HICON ImageList_ExtractIcon(
   HINSTANCE  hi,
   HIMAGELIST himl,
   int        i
);

Parameters

hi

Type: HINSTANCE

This parameter is not used and should always be zero.

himl

Type: HIMAGELIST

A handle to the image list.

i

Type: int

The index of the image.

Return value

Type: HICON

Returns the handle of the icon or cursor if successful, or NULL otherwise.

Remarks

It is the responsibility of the calling application to destroy the icon returned from this function by using the DestroyIcon function.

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