更改对话框的背景色 [英] Changing background color of a dialog
本文介绍了更改对话框的背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我有一个对话框基础应用程序.为此,我想更改对话框的背景色.我该怎么办?请帮助我....
Hi all,
I''ve one dialog base application. In that I want to change the background color of my dialog box. How can I go with this? Please help me....
推荐答案
这很简单,也很简单 ^ ]将为您提供大量示例...
此文章 [ Michael Dunn [ ^ ]将对您有很大帮助(它还说明了如何更改对话框背景).
HTH!
That''s pretty easy and a simple google search[^] would have given you tons of examples...
This article[^] from Michael Dunn[^] will help you a lot (it also explains how to change that dialog background).
HTH!
一种方法是通过处理WM_CTLCOLOR,
http://www.programmersheaven.com/mb/mfc_coding/189499/189499/how-to-change-dialog-background-color-/ [ http://msdn.microsoft.com/en-us/library/6skhh669%28v = vs.80%29.aspx [ ^ ]
One way is By handling WM_CTLCOLOR,
http://www.programmersheaven.com/mb/mfc_coding/189499/189499/how-to-change-dialog-background-color-/[^]
or using ON_WM_ERASEBKGND
http://msdn.microsoft.com/en-us/library/6skhh669%28v=vs.80%29.aspx[^]
案例WM_CTLCOLORDLG://用于32位编译器
createsolidbruch(RGB(255,0,0)); //对于红色
case WM_CTLCOLORDLG: //for 32 bit complier
createsolidbruch(RGB(255,0,0)); //for red color
这篇关于更改对话框的背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文