| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1577 人关注过本帖
标题:求助,如何设置视图的背景颜色?
只看楼主 加入收藏
蓝风
Rank: 1
等 级:新手上路
帖 子:41
专家分:0
注 册:2005-12-9
收藏
 问题点数:0 回复次数:3 
求助,如何设置视图的背景颜色?
在文档/视图结构中的视图默认的背景颜色是白色的
我怎样修改视图的背景颜色呢?
搜索更多相关主题的帖子: 背景颜色 视图 文档 
2006-10-10 18:56
wfpb
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2188
专家分:0
注 册:2006-4-2
收藏
得分:0 
SetBkColor
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.

COLORREF SetBkColor(
HDC hdc, // handle to DC
COLORREF crColor // background color value
);
Parameters
hdc
[in] Handle to the device context.
crColor
[in] Specifies the new background color. To make a COLORREF value, use the RGB macro.
Return Values
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.

Windows NT/2000/XP: To get extended error information, call GetLastError.

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.


[glow=255,red,2]wfpb的部落格[/glow] 学习成为生活的重要组成部分!
2006-10-10 19:45
caizhihong
Rank: 1
等 级:新手上路
帖 子:63
专家分:0
注 册:2005-10-27
收藏
得分:0 

没有装中文输入法吧


盖茨来电话,他跟我说了一大串的英语。我真的不知道到底说了什么!!我长叹了一声:你还是说C语言吧!
2006-10-10 20:40
wfpb
Rank: 6Rank: 6
等 级:贵宾
威 望:29
帖 子:2188
专家分:0
注 册:2006-4-2
收藏
得分:0 
不是啊,我哪有这么高的英语水平啊。这是copy的MSDN上的内容。

[glow=255,red,2]wfpb的部落格[/glow] 学习成为生活的重要组成部分!
2006-10-10 22:02
快速回复:求助,如何设置视图的背景颜色?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013991 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved