15,980
社区成员




HBRUSH CNewDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(pWnd->GetDlgCtrlID() == IDC_EDIT1)
{
CString str;
pWnd->GetWindowText(str);
int i = _ttoi(str);
if(i > 100)
{
pDC->SetTextColor(RGB(255, 0, 128));
}
}
// TODO: Return a different brush if the default is not desired
return hbr;
}