// TODO: Change any attributes of the DC here
//if(pWnd->GetDlgCtrlID() ==IDD_COMMDLG_DIALOG)
{
brush.Detach();
brush.CreateSolidBrush(RGB(192,192,192));
hbr= brush;
}
// TODO: Return a different brush if the default is not desired
return hbr;
}
Call this member function from within the InitInstance member function to set the default background and text color for dialog boxes and message boxes within your application.
Example
BOOL CMyApp::InitInstance()
{
// Standard initialization
SetDialogBkColor(); // Set dialog background color to gray
LoadStdProfileSettings(); // Load standard INI file options (including MRU)