Export (0) Print
Expand All

GetIconInfo function

Retrieves information about the specified icon or cursor.

Syntax


BOOL WINAPI GetIconInfo(
  _In_   HICON hIcon,
  _Out_  PICONINFO piconinfo
);

Parameters

hIcon [in]

Type: HICON

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

ValueMeaning
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 [out]

Type: PICONINFO

A pointer to an ICONINFO structure. The function fills in the structure's members.

Return value

Type: BOOL

If the function succeeds, the return value is nonzero and the function fills in the members of the specified ICONINFO structure.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

GetIconInfo creates bitmaps for the hbmMask and hbmColor members of ICONINFO. The calling application must manage these bitmaps and delete them when they are no longer necessary.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

Reference
CreateIcon
CreateIconFromResource
CreateIconIndirect
DestroyIcon
DrawIcon
DrawIconEx
ICONINFO
LoadIcon
LookupIconIdFromDirectory
Conceptual
Icons

 

 

Community Additions

ADD
Show:
© 2014 Microsoft