?
Falls ich die Aufgabenstellung richtig verstanden habe musst du folgenden code verwenden:
HBRUSH CdertDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
CRect r;
if (pWnd->GetDlgCtrlID() == IDC_STATIC_COLOR)
{
CBrush br;
br.CreateSolidBrush(RGB(200,0,0));
this->GetDlgItem(IDC_STATIC_COLOR)->GetClientRect(r);
pDC->FillRect(r,&br);
br.DeleteObject();
}
return hbr;
}