HBRUSH CPurchaseManageDlg::OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor)
{
COLORREF backColor = RGB(216, 231, 252); //office 2003背景色
pDC->SetBkMode(TRANSPARENT); //设置控件背景透明
// 判断下是不是你要改的控件ID
if( pWnd->GetDlgCtrlID() == IDC_C_CPERSON || pWnd->GetDlgCtrlID() == IDC_C_APERSON )
{
pDC->SetBkColor(RGB(153, 255, 204));
}
return CreateSolidBrush(backColor); //创建背景刷子
}