(HBRUSH)(COLOR_WINDOW+1)等同GetSysColorBrush(COLOR_WINDOW)
来源:互联网 发布:linux设置目录权限 编辑:程序博客网 时间:2024/05/23 07:22
Windows requires that you add 1 when you use these identifiers and are specifying them in the hbrBackground field of the WNDCLASS structure, but doing so has no profound purpose other than to prevent the value from being NULL.
--摘自《window程序设计》
意思是说,使用颜色的时候,必须把每个颜色宏+1,才能得到正确的颜色,这是用法,没有特别的含义。
因为滚动条颜色宏被定义成 #define COLOR_SCROLLBAR 0
如果不进行+1的话,使用这个颜色就是意外的变成NULL,为了避免这种情况,所以把所有的颜色值+1处理。
其他里面具体怎么实现的,我还真不知道,微软说的:要+1。
- (HBRUSH)(COLOR_WINDOW+1)等同GetSysColorBrush(COLOR_WINDOW)
- (HBRUSH)(COLOR_WINDOW+1)等同GetSysColorBrush(COLOR_WINDOW)
- hbrBackground = (HBRUSH)(COLOR_WINDOW+1), what is +1 for ???
- HBRUSH
- HBrush用法
- 完全等同
- windows画刷HBRUSH
- HBRUSH的使用
- HBRUSH的用法
- HBRUSH,网上找的哈
- 英国研究称遛狗2个月锻炼效果等同健身1年
- 1、Eclipse版本android 65535解决方案(原理等同android studio现在的分包方式)--Ant安装
- 1、Eclipse版本android 65535解决方案(原理等同android studio现在的分包方式)--Ant安装
- 感光等同钾
- 等同,equals,null
- 开源是否等同自由
- 让sublime等同web storm
- 取画刷(HBrush)的6种方法
- springside3.3.4的一些看法
- Dictionary操作《一》
- frameset 在zendstudio下面警告 原因:
- Ubuntu下看不见pthread_create(安装pthread线程库)
- 程序员编程艺术:第八章、从头至尾漫谈虚函数
- (HBRUSH)(COLOR_WINDOW+1)等同GetSysColorBrush(COLOR_WINDOW)
- 通过创建无线点对点网络,让Mac和Windows7互相访问对方的共享文件夹
- ARM启动及工作模式切换
- iPhone基础开发之switch控件的使用
- 使用kermit传输uboot
- Tarjan O(n+m) 算法【转】
- 你不可不知的Mango — 开发者篇(1)
- perl 数组应用
- Linux/Unix环境下的make和makefile详解(非常详细, 推荐!)