简体   繁体   English

如何以编程方式更改MFC中组框的默认标题颜色?

[英]How to change default caption color of group box in MFC programmatically?

Currently groupboxs in my application shows caption in blue color in Windows xp and black in windows 7. How to change default caption color of group box in MFC programmatically? 当前,我的应用程序中的分组框在Windows XP中显示为蓝色,在Windows 7中为黑色。如何以编程方式在MFC中更改分组框的默认标题颜色? so that it can be shown in black color in both Windows XP and Windows 7. 因此在Windows XP和Windows 7中都可以将其显示为黑色。

Take a look at OnCtlColor(). 看一下OnCtlColor()。 MFC will call this before it draws the control to allow you to set the brushes. MFC在绘制控件以允许您设置画笔之前将调用此方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM