网站首页  词典首页

请输入您要查询的函数:

 

术语 setbkcolor
释义 SetBkColor
语法:
COLORREF SetBkColor(
__in HDC hdc,
__in COLORREF crColor
);
SetBkColor函数
该SetBkColor函数设置当前的背景颜色为指定的颜色值,或到最近的身体颜色如果该设备不能代表指定的颜色值。
参数
hdc [in]
一个句柄,设备上下文。
crColor [in]
新的背景颜色。要使COLORREF值,使用RGB宏。
返回值
如果函数成功,返回值指定为COLORREF值上的背景颜色。
如果函数失败,返回值是CLR_INVALID。
备注
此函数填充式线之间的绘制使用由CreatePen函数创建一支笔的差距,它不填写线之间的风格绘制使用由ExtCreatePen函数创建一支笔差距。该SetBkColor函数还规定了TextOut和ExtTextOut的背景颜色。
如果背景是不透明的方式,背景颜色是用来填补式线之间的差距,两国在刷孵化线的差距,和性格细胞。背景色时,也可用于从彩色位图转换为单色,反之亦然。
实例
有关示例,请参见“示例的业主在使用菜单绘制菜单项”。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWingdi.h(头文件:winuser.h)
LibraryGdi32.lib
DLLGdi32.dll
参见
绘画和绘图概述
绘画和绘图功能
COLORREF
CreatePen
ExtCreatePen
GetBKColor
GetBkMode
SetBkMode
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年7月11日
==英文原文==SetBkColor Function
The SetBkColor function sets the current background color to the specified color value, or to the nearest physical color if the device cannot represent the specified color value.
Syntax
COLORREF SetBkColor(
__in HDC hdc,
__in COLORREF crColor
);
Parameters
hdc [in]
A handle to the device context.
crColor [in]
The new background color. To make a COLORREF value, use the RGB macro.
Return Value
If the function succeeds, the return value specifies the previous background color as a COLORREF value.
If the function fails, the return value is CLR_INVALID.
Remarks
This function fills the gaps between styled lines drawn using a pen created by the CreatePen function; it does not fill the gaps between styled lines drawn using a pen created by the ExtCreatePen function. The SetBkColor function also sets the background colors for TextOut and ExtTextOut .
If the background mode is OPAQUE, the background color is used to fill gaps between styled lines, gaps between hatched lines in brushes, and character cells. The background color is also used when converting bitmaps from color to monochrome and vice versa.
Examples
For an example, see "Example of Owner-Drawn Menu Items" 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
Painting and Drawing Overview
Painting and Drawing Functions
COLORREF
CreatePen
ExtCreatePen
GetBKColor
GetBkMode
SetBkMode
Send comments about this topic to Microsoft
Build date: 7/11/2009
==原始网址==http://msdn.microsoft.com/en-us/library/dd162964(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:18:54