HBRUSH CMyDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
// HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
// TODO: Return a different brush if the default is not desired
// TODO: Change any attributes of the DC here
HBRUSH hbr=(HBRUSH)::GetStockObject(NULL_BRUSH);
if (CTLCOLOR_STATIC==nCtlColor)
{
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(RGB(25,25,255));
}
if (CTLCOLOR_BTN==nCtlColor ||CTLCOLOR_EDIT==nCtlColor)
{ hbr =::CreateSolidBrush(RGB(255,255,255));
pDC->SetBkMode(TRANSPARENT);
pDC->SetTextColor(RGB(255,0,0));
}
// TODO: Return a different brush if the default is not desired
return hbr;
}