在dialog中:
OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) 
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (nCtlColor == CTLCOLOR_STATIC )
{
// Set the text color to red
pDC->SetTextColor(RGB(255, 255, 255));
pDC->SetBkColor(RGB(255,0,0));
// Set the background mode for text to transparent 
// so background will show thru.
pDC->SetBkMode(TRANSPARENT);
HBRUSH brs = ::CreateSolidBrush(RGB(255,0,0));
// Return handle to our CBrush object
hbr = brs;
}
return hbr;
}