GetIconInfoExA function (winuser.h)

Retrieves information about the specified icon or cursor. GetIconInfoEx extends GetIconInfo by using the newer ICONINFOEX structure.

Syntax

BOOL GetIconInfoExA(
  HICON        hicon,
  PICONINFOEXA piconinfo
);

Parameters

hicon

Type: HICON

A handle to the icon or cursor. To retrieve information about a standard icon or cursor, specify one of the following values.

Value Meaning
IDC_APPSTARTING
MAKEINTRESOURCE(32650)
Standard arrow and small hourglass cursor.
IDC_ARROW
MAKEINTRESOURCE(32512)
Standard arrow cursor.
IDC_CROSS
MAKEINTRESOURCE(32515)
Crosshair cursor.
IDC_HAND
MAKEINTRESOURCE(32649)
Hand cursor.
IDC_HELP
MAKEINTRESOURCE(32651)
Arrow and question mark cursor.
IDC_IBEAM
MAKEINTRESOURCE(32513)
I-beam cursor.
IDC_NO
MAKEINTRESOURCE(32648)
Slashed circle cursor.
IDC_SIZEALL
MAKEINTRESOURCE(32646)
Four-pointed arrow cursor pointing north, south, east, and west.
IDC_SIZENESW
MAKEINTRESOURCE(32643)
Double-pointed arrow cursor pointing northeast and southwest.
IDC_SIZENS
MAKEINTRESOURCE(32645)
Double-pointed arrow cursor pointing north and south.
IDC_SIZENWSE
MAKEINTRESOURCE(32642)
Double-pointed arrow cursor pointing northwest and southeast.
IDC_SIZEWE
MAKEINTRESOURCE(32644)
Double-pointed arrow cursor pointing west and east.
IDC_UPARROW
MAKEINTRESOURCE(32516)
Vertical arrow cursor.
IDC_WAIT
MAKEINTRESOURCE(32514)
Hourglass cursor.
IDI_APPLICATION
MAKEINTRESOURCE(32512)
Application icon.
IDI_ASTERISK
MAKEINTRESOURCE(32516)
Asterisk icon.
IDI_EXCLAMATION
MAKEINTRESOURCE(32515)
Exclamation point icon.
IDI_HAND
MAKEINTRESOURCE(32513)
Stop sign icon.
IDI_QUESTION
MAKEINTRESOURCE(32514)
Question-mark icon.
IDI_WINLOGO
MAKEINTRESOURCE(32517)
Application icon.

Windows 2000:  Windows logo icon.

piconinfo

Type: PICONINFOEX

When this method returns, contains a pointer to an ICONINFOEX structure. The function fills in the structure's members.

Return value

Type: BOOL

TRUE indicates success, FALSE indicates failure.

Remarks

GetIconInfoEx creates bitmaps for the hbmMask and hbmCol or members of ICONINFOEX. The calling application must manage these bitmaps and delete them when they are no longer necessary.

DPI Virtualization

This API does not participate in DPI virtualization. The output returned is not affected by the DPI of the calling thread.

Note

The winuser.h header defines GetIconInfoEx as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

   
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See also

Conceptual

CreateIcon

CreateIconFromResource

CreateIconIndirect

DestroyIcon

DrawIcon

DrawIconEx

ICONINFO

Icons

LoadIcon

LookupIconIdFromDirectory

Reference