如何改变CDateTimeCtrl的背面颜色?任何源代码? [英] how to change Back color of CDateTimeCtrl ? Any source code ?

查看:102
本文介绍了如何改变CDateTimeCtrl的背面颜色?任何源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我已将CDateTimeCtrl放在Dialog上。我想在对话框中显示时更改cdateTime Control的背景颜色。由于我只能改变MothCalc控制背面颜色和文字颜色,我无法改变CDateTimeCtrl的背面颜色。

我该怎么办?



你能帮我解决一下示例代码吗?


i have placed the CDateTimeCtrl on the Dialog. I want to change the back color of the cdateTime Control as it displaying on the dialog. As i can change only the MothCalc Control Back color and text Color, I can not change the back colour of the CDateTimeCtrl.
How can I ?

Can you help me for the sample code as well ?

推荐答案

覆盖 CWnd :: OnEraseBkgnd [ ^ ]方法,可能就是这样做的。
Overriding the CWnd::OnEraseBkgnd[^] method, may be the way to do it.


这篇关于如何改变CDateTimeCtrl的背面颜色?任何源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆