ICONINFO structure (winuser.h)
Contains information about an icon or a cursor.
Syntax
typedef struct _ICONINFO {
BOOL fIcon;
DWORD xHotspot;
DWORD yHotspot;
HBITMAP hbmMask;
HBITMAP hbmColor;
} ICONINFO;
Members
fIcon
Type: BOOL
Specifies whether this structure defines an icon or a cursor. A value of TRUE specifies an icon; FALSE specifies a cursor.
xHotspot
Type: DWORD
The x-coordinate of a cursor's hot spot. If this structure defines an icon, the hot spot is always in the center of the icon, and this member is ignored.
yHotspot
Type: DWORD
The y-coordinate of the cursor's hot spot. If this structure defines an icon, the hot spot is always in the center of the icon, and this member is ignored.
hbmMask
Type: HBITMAP
A handle to the icon monochrome mask bitmap.
hbmColor
Type: HBITMAP
A handle to the icon color bitmap.
Remarks
For monochrome icons, the hbmMask is twice the height of the icon (with the AND mask on top and the XOR mask on the bottom), and hbmColor is NULL. Also, in this case the height should be an even multiple of two.
For color icons, the hbmMask and hbmColor bitmaps are the same size, each of which is the size of the icon.
You can use a GetObject function to get contents of hbmMask and hbmColor in the BITMAP structure. The bitmap bits can be obtained with call to GetDIBits on the bitmaps in this structure.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | winuser.h (include Windows.h) |
See also
Conceptual
Reference