网站首页  词典首页

请输入您要查询的函数:

 

术语 setpixel
释义 SetPixel
语法:
COLORREF SetPixel(
__in HDC hdc,
__in int X,
__in int Y,
__in COLORREF crColor
);
SetPixel函数
该SetPixel函数设置在指定的像素坐标到指定的颜色。
参数
hdc [in]
一个句柄,设备上下文。
X [in]
的x坐标,按逻辑单位,该点被设置。
y [in]
在y坐标,按逻辑单位的问题,要设置。
crColor [in]
颜色用来绘制点。要创建一个COLORREF颜色值,使用RGB宏。
返回值
如果函数成功,返回值是RGB值的函数设置像素。该值可能不同于由crColor指定的颜色,这发生在一个指定的颜色完全匹配无法找到。
如果函数失败,返回值为-1。
这可能是下面的值。
返回codeDescription
ERROR_INVALID_PARAMETEROne或输入参数更是无效的。
备注
函数失败如果像素坐标在于目前的剪辑区域之外。
并非所有设备都支持SetPixel功能。有关更多信息,请参见GetDeviceCaps。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
位图概述
位图功能
GetDeviceCaps
GetPixel
SetPixelV
COLORREF
的RGB
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetPixel Function
The SetPixel function sets the pixel at the specified coordinates to the specified color.
Syntax
COLORREF SetPixel(
__in HDC hdc,
__in int X,
__in int Y,
__in COLORREF crColor
);
Parameters
hdc [in]
A handle to the device context.
X [in]
The x-coordinate, in logical units, of the point to be set.
Y [in]
The y-coordinate, in logical units, of the point to be set.
crColor [in]
The color to be used to paint the point. To create a COLORREF color value, use the RGB macro.
Return Value
If the function succeeds, the return value is the RGB value that the function sets the pixel to. This value may differ from the color specified by crColor; that occurs when an exact match for the specified color cannot be found.
If the function fails, the return value is -1.
This can be the following value.
Return codeDescription
ERROR_INVALID_PARAMETEROne or more of the input parameters is invalid.

Remarks
The function fails if the pixel coordinates lie outside of the current clipping region.
Not all devices support the SetPixel function. For more information, see GetDeviceCaps .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Bitmaps Overview
Bitmap Functions
GetDeviceCaps
GetPixel
SetPixelV
COLORREF
RGB
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145078(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:30:08