| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 467 人关注过本帖
标题:一小段程序编译通过,但还是存在问题,帮忙看下
取消只看楼主 加入收藏
shn521
Rank: 2
等 级:论坛游民
威 望:1
帖 子:56
专家分:52
注 册:2010-6-18
结帖率:73.33%
收藏
已结贴  问题点数:20 回复次数:1 
一小段程序编译通过,但还是存在问题,帮忙看下
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();
}
控件变白,点击下就出现错误。
图片附件: 游客没有浏览图片的权限,请 登录注册
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: 编译 
2010-09-08 19:13
shn521
Rank: 2
等 级:论坛游民
威 望:1
帖 子:56
专家分:52
注 册:2010-6-18
收藏
得分:0 
以下是引用红色警戒在2010-9-8 20:55:05的发言:

按你的代码试过了没有问题
分分都给你啦
2010-09-10 22:00
快速回复:一小段程序编译通过,但还是存在问题,帮忙看下
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016551 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved