Changing the background color of a dialog
If you want to change the background color of your dialog box, it is a very simple.
In your CTestDlg header file, declare a member variable from CBrush:
class CTestDlg : public CDialog{…protected: CBrush m_brush;…};
Then, add this line in the OnInitDialog function:
BOOL CTestDlg::OnInitDialog(){ … m_brush.CreateSolidBrush(RGB(255, 255, 255));
// color...
by saim at November 1st, 2009 at 09:11 am