HBRUSH CBrushBKDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
CBrush m_brush; //定义画刷
m_brush.CreateSolidBrush(RGB(255,0,0));//指定画刷颜色
CRect m_rect;
GetClientRect(m_rect);//客户区矩形
pDC->SelectObject(&m_brush);//选择画刷
pDC->FillRect(m_rect,&m_brush);//填充矩形区
return m_brush;
}