为对话框和按钮赋予颜色 [英] Give color to dialogs and buttons

查看:97
本文介绍了为对话框和按钮赋予颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在MFC中为对话框添加背景还是仅提供颜色?
我们可以更改按钮的文本颜色吗?

Can we give a background or just a color to our dialogus in MFC?
Can we change the text color of buttons?

推荐答案

Sweety Khan写道:
Sweety Khan wrote:

我们可以在MFC中为对话框添加背景或只是颜色吗?

Can we give a background or just a color to our dialogus in MFC?


是的,您可以处理WM_CTLCOLORDLG [对话框常见问题" .



Yes, you may handle the WM_CTLCOLORDLG [^] message, see, for instance "Dialog FAQ".


Sweety Khan写道:
Sweety Khan wrote:

我们可以更改按钮的文本颜色吗?

Can we change the text color of buttons?


以类似的方式,处理WM_CTLCOLORBTN消息[ ^ ].


[添加]
您确实需要一些入门资料:
参见此处[ ^ ]有关对话框中Windows消息处理的文章系列.
[/添加]

:)


In a similar way, handle the WM_CTLCOLORBTN message [^].


[added]
You really need some introductory material:
See here [^] for an article series on Windows message handling in dialogs.
[/added]

:)


这篇关于为对话框和按钮赋予颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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