MFC动态改变编辑框里的文字颜色

  1. 重载 HBRUSH C人脸比对Dlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
      {
      if(pWnd->GetDlgCtrlID()==IDC_STATIC1)
      {
  2.   pDC->SetTextColor(RGB(255,0,0));
      }
      if(pWnd->GetDlgCtrlID()==IDC_STATIC2)
      {
  3.   pDC->SetTextColor(RGB(255,125,0));
      }
      if(pWnd->GetDlgCtrlID()==IDC_STATIC3)
      {
  4.   pDC->SetTextColor(RGB(255,200,0));
      }
      }

你可能感兴趣的:(C++)