网站首页  词典首页

请输入您要查询的函数:

 

术语 setdcpencolor
释义 SetDCPenColor
语法:
COLORREF SetDCPenColor(
__in HDC hdc,
__in COLORREF crColor
);
SetDCPenColor功能
SetDCPenColor函数设置当前设备上下文(DC)笔颜色为指定的颜色值。如果设备不能代表指定的颜色值,颜色设置为最接近身体的颜色。
参数
hdc [in]
句柄到DC。
crColor [in]
新的笔颜色。
返回值
如果函数成功,返回值指定为COLORREF值前区笔颜色。如果函数失败,返回值是CLR_INVALID。
备注
该函数返回前DC_PEN颜色,即使股票笔DC_PEN不直流选定,但是,这不会是在制订之前,股票DC_PEN业务所使用的是直流电,在选定的。
同一个DC_BRUSH或DC_PEN参数GetStockObject函数可以互换使用的SetDCPenColor和SetDCBrushColor功能。
ICM的:色彩管理是ICM的执行,如果启用。
实例
对于颜色的设置示例,请参见设置笔或画笔颜色。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
设备上下文概述
设备上下文函数
GetDCPenColor
COLORREF
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetDCPenColor Function
SetDCPenColor function sets the current device context (DC) pen color to the specified color value. If the device cannot represent the specified color value, the color is set to the nearest physical color.
Syntax
COLORREF SetDCPenColor(
__in HDC hdc,
__in COLORREF crColor
);
Parameters
hdc [in]
A handle to the DC.
crColor [in]
The new pen color.
Return Value
If the function succeeds, the return value specifies the previous DC pen color as a COLORREF value. If the function fails, the return value is CLR_INVALID.
Remarks
The function returns the previous DC_PEN color, even if the stock pen DC_PEN is not selected in the DC; however, this will not be used in drawing operations until the stock DC_PEN is selected in the DC.
The GetStockObject function with an argument of DC_BRUSH or DC_PEN can be used interchangeably with the SetDCPenColor and SetDCBrushColor functions.
ICM: Color management is performed if ICM is enabled.
Examples
For an example of setting colors, see Setting the Pen or Brush Color .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Device Contexts Overview
Device Context Functions
GetDCPenColor
COLORREF
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162970(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 13:25:15