vc 设置文本编辑框的背景颜色??
这是我的代码HBRUSH CMmDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) {HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);// TODO: Change any attributes of the DC here//case CTLCOLOR_EDIT://case CTLCOLOR_MSGBOX://假设控件是文本框或者消息框,则进入下一个switchswitch (pWnd->GetDlgCtrlID())//对某一个特定控件进行判断{ // first CEdit control IDcase IDC_INPUTSTATE: // 输入测试// hereif(m_inputstate=="pass"){pDC->SetBkColor(m_greencolor); // change the background// color [background colour// of the text ONLY]pDC->SetTextColor(m_textcolor); // change the text colorhbr = (HBRUSH) m_bluebrush; // apply the blue brushbreak;}if(m_inputstate=="fail"){pDC->SetBkColor(m_redcolor); // change the background// color [background colour// of the text ONLY]pDC->SetTextColor(m_textcolor); // change the text colorhbr = (HBRUSH) m_bluebrush; // apply the blue brushbreak;}为什么当结果是fail是出来的背景颜色是这样的??只有一半是红的??我要他全部是红的啊