BOOL DrawIcon(hdc, X, Y, hicon) | |||||
HDC hdc; | /* handle of device context | */ | |||
int X; | /* x-coordinate of upper-left corner | */ | |||
int Y; | /* y-coordinate of upper-left corner | */ | |||
HICON hicon; | /* handle of icon to draw | */ |
This function draws an icon on the specified device. The DrawIcon function places the icon's upper-left corner at the location specified by the X and Y parameters. The location is subject to the current mapping mode of the device context.
hdc
Identifies the device context for a window.
X
Specifies the logical x-coordinate of the upper-left corner of the icon.
Y
Specifies the logical y-coordinate of the upper-left corner of the icon.
hicon
Identifies the icon to be drawn.
The return value specifies the outcome of the function. It is TRUE if the function is successful. Otherwise, it is FALSE.
The icon resource must have been previously loaded by using the LoadIcon function.
LoadIcon, OpenIcon, CreateIcon