网站首页  词典首页

请输入您要查询的函数:

 

术语 settextcolor
释义 SetTextColor
语法:
COLORREF SetTextColor(
__in HDC hdc,
__in COLORREF crColor
);
SetTextColor函数
该SetTextColor函数设置为指定的设备上下文指定颜色的文本颜色。
参数
hdc [in]
一个句柄,设备上下文。
crColor [in]
文本的颜色。
返回值
如果函数成功,返回值是作为一个COLORREF值上的文本颜色颜色参考。
如果函数失败,返回值是CLR_INVALID。
备注
文字颜色是用于绘制由TextOut和ExtTextOut职能书面每个字符的脸。文本颜色也被用于从彩色位图转换为单色,反之亦然。
实例
有关示例,请参阅“使用菜单设置字体的菜单项文本字符串”。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
字体和文字概述
字体和文本函数
BitBLT等
ExtTextOut
GetTextColor
的RGB
SetBkColor
StretchBlt
TextOut
COLORREF
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetTextColor Function
The SetTextColor function sets the text color for the specified device context to the specified color.
Syntax
COLORREF SetTextColor(
__in HDC hdc,
__in COLORREF crColor
);
Parameters
hdc [in]
A handle to the device context.
crColor [in]
The color of the text.
Return Value
If the function succeeds, the return value is a color reference for the previous text color as a COLORREF value.
If the function fails, the return value is CLR_INVALID.
Remarks
The text color is used to draw the face of each character written by the TextOut and ExtTextOut functions. The text color is also used in converting bitmaps from color to monochrome and vice versa.
Examples
For an example, see "Setting Fonts for Menu-Item Text Strings" in Using Menus .
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWingdi.h (include Windows.h)
LibraryGdi32.lib
DLLGdi32.dll
See Also
Fonts and Text Overview
Font and Text Functions
BitBlt
ExtTextOut
GetTextColor
RGB
SetBkColor
StretchBlt
TextOut
COLORREF
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd145093(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:15:56