标题:帮忙看看这个代码是否有错?
只看楼主
neau
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2007-9-17
 问题点数:0 回复次数:0 
帮忙看看这个代码是否有错?
void CRegisterView::OnEditRegister()
{
    CRegisterDialog dlg;

    if( dlg.DoModal() == IDOK )
    {
        CString str;

        GetWindowText( str );

        str += "/r/n";
        str += "姓名:";
        str += dlg.M_strName;
        str += "/r/n";
        str += "性别:";
        str += dlg.m_nSex?"女":"男";
        str += "/r/n";
        str += "年龄:";
        CString str1;

        str1.Format( "&d", dlg.m_nAge );
        str += str1;
        str += "/r/n";
        str += "婚否";
        str += dlg.m_bMarried?"已婚":"未婚";
        str += "/r/n";
        str += "婚姻状况";
        str += dlg.m_nWork?"在职":"下岗";
        str += "/r/n";
        str += "工作单位";
        str += dlg.m_strUnit;
        str += "/r/n";
        str += "单位性质";
        str += dlg.m_strKind;
        str += "/r/n";
        str += "工资收入";
        str += dlg.m_strIncome ;
        str += "/r/n";

        SetWindowText( str );

    }
}

这个代码编译没有问题,但是点击控件,对话框就是打不开?
麻烦高人给说说原因
搜索更多相关主题的帖子: 代码 
2008-05-07 14:13



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-212946-1-1.html




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

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