网站首页  词典首页

请输入您要查询的函数:

 

术语 drawiconex
释义 DrawIconEx
语法:
BOOL DrawIconEx( HDC hdc,
int xLeft,
int yTop,
HICON hIcon,
int cxWidth,
int cyWidth,
UINT istepIfAniCur,
HBRUSH hbrFlickerFreeDraw,
UINT diFlags
);
DrawIconEx功能
The DrawIconEx function draws an icon or cursor into the specified device context, performing the specified raster operations, and stretching or compressing the icon or cursor as specified.
参数
hdc
[in]设备句柄断章取义,把该图标或光标将以抽签。
xLeft
[in]指定逻辑x坐标的图标或光标的左上角。
yTop
[in]指定的逻辑y坐标的图标或光标的左上角。
hIcon的
[in]句柄图标或光标移动到的教训。此参数可以找到一个动画光标。
cxWidth
[in]指定图标或光标的逻辑宽度。如果这个参数是零,diFlags参数DI_DEFAULTSIZE,该函数使用SM_CXICON或SM_CXCURSOR系统公制值设定宽度。如果该参数为零,DI_DEFAULTSIZE不使用,该函数使用实际资源的宽度。
cyWidth
[in]指定图标或光标的逻辑高度。如果这个参数是零,diFlags参数DI_DEFAULTSIZE,该函数使用SM_CYICON或SM_CYCURSOR系统公制值设定宽度。如果该参数为零,DI_DEFAULTSIZE不使用,该函数使用实际资源的高度。
istepIfAniCur
[in]指定的框架制定指数,如果hIcon的标识一个动画光标。此参数被忽略,如果不hIcon的确定一个动画光标。
hbrFlickerFreeDraw
[in]句柄一刷,该系统为无闪烁绘图用途。如果hbrFlickerFreeDraw是一个有效的刷柄,系统创建一个屏幕外位图使用的背景颜色指定的画笔,绘制成位图的图标或光标,然后将所确定的hdc设备上下文复制位图。如果hbrFlickerFreeDraw为NULL,系统绘制图标或光标直接进入设备上下文。
diFlags
[in]指定绘图标志。此参数可以是下列值之一:
DI_COMPAT
绘制该图标或光标使用该系统的默认的图像,而不是用户指定的图像。有关更多信息,请参阅关于游标。 Windows NT4.0的和更高版本:此标志将被忽略。
DI_DEFAULTSIZE
绘制该图标或光标的宽度和使用该系统指定高度公制值游标或图标,如果cxWidth和cyWidth参数设置为零。如果此标志没有被指定的cxWidth和cyWidth设置为零,该函数使用实际资源的大小。
DI_IMAGE
绘制该图标或光标使用图像。
DI_MASK
绘制该图标或光标使用面具。
DI_NOMIRROR
Windows XP中:作为一个镜像的绘制图标的图标。默认情况下,该图标是画成一个镜像的镜像图标,如果hdc。
DI_NORMAL
结合DI_IMAGE和DI_MASK。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
地方的DrawIconEx功能图标的左上角在由xLeft和yTop参数指定的位置角落。该位置是受设备上下文的当前映射模式。
要复制DrawIcon(探知,的X,Y,hIcon的),呼叫DrawIconEx如下:
DrawIconEx(探知,的X,Y,hIcon的,0,0,0,空,DI_NORMAL | DI_COMPAT | DI_DEFAULTSIZE);
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.5
UnicodeImplemented为Unicode版本。
参见
图标概述,CopyImage,DrawIcon,的LoadImage
==英文原文==DrawIconEx Function
The DrawIconEx function draws an icon or cursor into the specified device context, performing the specified raster operations, and stretching or compressing the icon or cursor as specified.
Syntax
BOOL DrawIconEx( HDC hdc,
int xLeft,
int yTop,
HICON hIcon,
int cxWidth,
int cyWidth,
UINT istepIfAniCur,
HBRUSH hbrFlickerFreeDraw,
UINT diFlags
);
Parameters
hdc
[in] Handle to the device context into which the icon or cursor will be drawn.
xLeft
[in] Specifies the logical x-coordinate of the upper-left corner of the icon or cursor.
yTop
[in] Specifies the logical y-coordinate of the upper-left corner of the icon or cursor.
hIcon
[in] Handle to the icon or cursor to be drawn. This parameter can identify an animated cursor.
cxWidth
[in] Specifies the logical width of the icon or cursor. If this parameter is zero and the diFlags parameter is DI_DEFAULTSIZE, the function uses the SM_CXICON or SM_CXCURSOR system metric value to set the width. If this parameter is zero and DI_DEFAULTSIZE is not used, the function uses the actual resource width.
cyWidth
[in] Specifies the logical height of the icon or cursor. If this parameter is zero and the diFlags parameter is DI_DEFAULTSIZE, the function uses the SM_CYICON or SM_CYCURSOR system metric value to set the width. If this parameter is zero and DI_DEFAULTSIZE is not used, the function uses the actual resource height.
istepIfAniCur
[in] Specifies the index of the frame to draw, if hIcon identifies an animated cursor. This parameter is ignored if hIcon does not identify an animated cursor.
hbrFlickerFreeDraw
[in] Handle to a brush that the system uses for flicker-free drawing. If hbrFlickerFreeDraw is a valid brush handle, the system creates an offscreen bitmap using the specified brush for the background color, draws the icon or cursor into the bitmap, and then copies the bitmap into the device context identified by hdc. If hbrFlickerFreeDraw is NULL, the system draws the icon or cursor directly into the device context.
diFlags
[in] Specifies the drawing flags. This parameter can be one of the following values:
DI_COMPAT
Draws the icon or cursor using the system default image rather than the user-specified image. For more information, see About Cursors . Windows NT4.0 and later: This flag is ignored.
DI_DEFAULTSIZE
Draws the icon or cursor using the width and height specified by the system metric values for cursors or icons, if the cxWidth and cyWidth parameters are set to zero. If this flag is not specified and cxWidth and cyWidth are set to zero, the function uses the actual resource size.
DI_IMAGE
Draws the icon or cursor using the image.
DI_MASK
Draws the icon or cursor using the mask.
DI_NOMIRROR
Windows XP: Draws the icon as an unmirrored icon. By default, the icon is drawn as a mirrored icon if hdc is mirrored.
DI_NORMAL
Combination of DI_IMAGE and DI_MASK.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
The DrawIconEx function places the icon's upper-left corner at the location specified by the xLeft and yTop parameters. The location is subject to the current mapping mode of the device context.
To duplicate DrawIcon (hDC, X, Y, hIcon), call DrawIconEx as follows:
DrawIconEx (hDC, X, Y, hIcon, 0, 0, 0, NULL, DI_NORMAL | DI_COMPAT | DI_DEFAULTSIZE);
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.5
UnicodeImplemented as Unicode version.
See Also
Icons Overview , CopyImage , DrawIcon , LoadImage
==原始网址==http://msdn.microsoft.com/en-us/library/ms648065(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:24:09