diffcult problem.who can answer it?
Visual C++6.0 environment.Use API function.
There is a edit box.its id is EDIT1,its hwnd is hedit.
When you type character in the edit box .the color of the character is red.
How to do?
上面的不对 这样才好 HBRUSH CDdDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(nCtlColor == CTLCOLOR_EDIT) { if(pWnd->GetDlgCtrlID() == IDC_EDIT1) { pDC->SetTextColor(RGB(255,0,0));//改变字体颜色 } } return hbr; }