慕仙森
在主窗口里响应WM_CTLCOLOR消息.如果不行再HI我HBRUSH CEdDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor){HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);// TODO: Change any attributes of the DC hereif(IDC_EDIT1 == pWnd->GetDlgCtrlID() && nCtlColor == CTLCOLOR_EDIT){COLORREF clr = RGB(0,0,0);pDC->SetBkColor(clr);return ::CreateSolidBrush(clr);}// TODO: Return a different brush if the default is not desiredreturn hbr;}