WNDCLASS wc; ... wc.hbrBackground = (HBrush)GetStockObject(COLOR_WINDOW+1);
我无法打开什么是+1 ,什么是HBrush ?
在调用accept()时exception
使用C#在远程计算机上设置date,时间和时区
无人参与安装二进制Python包(模块)的Windows
在任何行上插入字符,用于多行
Docker卡在“等待SSH可用…”
在Winuser.h定义的系统颜色
#define CTLCOLOR_MSGBox 0 #define CTLCOLOR_EDIT 1 #define CTLCOLOR_LISTBox 2 #define CTLCOLOR_BTN 3 #define CTLCOLOR_DLG 4 #define CTLCOLOR_SCROLLBAR 5 #define CTLCOLOR_STATIC 6 #define CTLCOLOR_MAX 7 #define COLOR_SCROLLBAR 0 #define COLOR_BACKGROUND 1 #define COLOR_ACTIVECAPTION 2 #define COLOR_INACTIVECAPTION 3 #define COLOR_MENU 4 #define COLOR_WINDOW 5 #define COLOR_WINDOWFRAME 6 #define COLOR_MENUTEXT 7 #define COLOR_WINDOWTEXT 8 #define COLOR_CAPTIONTEXT 9 #define COLOR_ACTIVEBORDER 10 #define COLOR_INACTIVEBORDER 11 #define COLOR_APPWORKSPACE 12 #define COLOR_HIGHLIGHT 13 #define COLOR_HIGHLIGHTTEXT 14 #define COLOR_BTNFACE 15 #define COLOR_BTNSHADOW 16 #define COLOR_GRAYTEXT 17 #define COLOR_BTNTEXT 18 #define COLOR_INACTIVECAPTIONTEXT 19 #define COLOR_BTNHIGHLIGHT 20 #if(WINVER >= 0x0400) #define COLOR_3DDKSHADOW 21 #define COLOR_3DLIGHT 22 #define COLOR_INFOTEXT 23 #define COLOR_INFOBK 24 #endif /* WINVER >= 0x0400 */ #if(WINVER >= 0x0500) #define COLOR_HOTLIGHT 26 #define COLOR_GRADIENTACTIVECAPTION 27 #define COLOR_GRADIENTINACTIVECAPTION 28 #if(WINVER >= 0x0501) #define COLOR_MENUHILIGHT 29 #define COLOR_MENUBAR 30 #endif /* WINVER >= 0x0501 */ #endif /* WINVER >= 0x0500 */ #if(WINVER >= 0x0400) #define COLOR_DESKTOP COLOR_BACKGROUND #define COLOR_3DFACE COLOR_BTNFACE #define COLOR_3DSHADOW COLOR_BTNSHADOW #define COLOR_3DHIGHLIGHT COLOR_BTNHIGHLIGHT #define COLOR_3DHILIGHT COLOR_BTNHIGHLIGHT #define COLOR_BTNHILIGHT COLOR_BTNHIGHLIGHT #endif /* WINVER >= 0x0400 */
所以,正如@CodyGray定义的那样,添加1来区分COLOR_SCROLLBAR和NULL HBrush。 而且,(引用@ CodyGray的评论和核心我的解决方案)“HBrush是一个C风格的演员,你应该使用static_cast<HBrush>而不是C风格的演员。
你不是这个意思吗?
wc.hbrBackground = (HBrush)(COLOR_WINDOW + 1);
GetStockObject获取股票画笔,钢笔,字体或调色板之一。 你不应该使用COLOR_WINDOW。
使用它的股票之一,所以白色的背景,你可以使用…
wc.hbrBackground = (HBrush)GetStockObject(WHITE_Brush);
无论什么作品,使用它!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。