有时候需要改变Edit中的文本颜色,只需要重载OnCtlColor() 代码如下: HBRUSH CTestEditColorTextDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)