为对话框和按钮赋予颜色 [英] Give color to dialogs and buttons
问题描述
我们可以在MFC中为对话框添加背景还是仅提供颜色?
我们可以更改按钮的文本颜色吗?
Can we give a background or just a color to our dialogus in MFC?
Can we change the text color of buttons?
推荐答案
我们可以在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".
我们可以更改按钮的文本颜色吗?
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屋!