Define a CBrush brush in head files;
Add it in initial position of the form brush.CreateSolidBrush(RGB(255,0,0));
--reload
HBRUSH CAboutDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(pWnd->m_hWnd == m_static.m_hWnd )
{
pDC->SetBkColor(RGB(255,0,0));
return (HBRUSH)brush;
}
// TODO: Return a different brush if the default is not desired
return hbr;
}