一小段程序编译通过,但还是存在问题,帮忙看下
HBRUSH CCOLORDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) {
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
// TODO: Change any attributes of the DC here
if(nCtlColor==CTLCOLOR_EDIT);
pDC->SetTextColor(color);
// TODO: Return a different brush if the default is not desired
return hbr;
}
void CCOLORDlg::OnRadio1()
{
// TODO: Add your control notification handler code here
color=RGB(255,0,0);
m_edit.SetFocus();
}
void CCOLORDlg::OnRadio2()
{
// TODO: Add your control notification handler code here
color=RGB(0,0,255);
m_edit.SetFocus();
}
void CCOLORDlg::OnRadio3()
{
// TODO: Add your control notification handler code here
color=RGB(0,255,0);
m_edit.SetFocus();
}
void CCOLORDlg::OnRadio4()
{
// TODO: Add your control notification handler code here
color=RGB(255,255,0);
m_edit.SetFocus();
}
控件变白,点击下就出现错误。