当前位置: 首页> 教育> 高考 > 东莞市招标网_seo 是什么_国外网站排名 top100_seo自学网视频教程

东莞市招标网_seo 是什么_国外网站排名 top100_seo自学网视频教程

时间:2025/7/12 20:24:23来源:https://blog.csdn.net/weixin_42350092/article/details/143668702 浏览次数:0次
东莞市招标网_seo 是什么_国外网站排名 top100_seo自学网视频教程

在主对话框调用子对话框设定参数值,使用theApp变量实现。

子对话框各参数变量

   CString    m_strTypeName;    CString    m_strBrand;    CString    m_strRemark;
    double    m_edit_min;    double    m_edit_max;
    double    m_edit_time2;
    double    m_edit_time1;
    double    m_edit_time3;
    DWORD    m_edit_time4;

参考MFC工控项目实例二十七添加产品参数

1、在SEAL_PRESSURE.h中添加代码

class CProductPara
{
public:union{struct{char	m_strTypeName[24];char	m_strBrand[24];			char	m_strRemark[64];double	m_edit_min;double	m_edit_max;double	m_edit_time1;double	m_edit_time2;double	m_edit_time3;double	m_edit_time4;};char len[1024];};
};class CSEAL_PRESSUREApp : public CWinApp
{
public:CSEAL_PRESSUREApp();CString   m_strTypeName;CString   m_strBrand;	CString   m_strRemark;double	m_edit_min;double	m_edit_max;double	m_edit_time1;double	m_edit_time2;double	m_edit_time3;double	m_edit_time4;
...
}

2、在SEAL_PRESSURE.h中添加代码

void CSEAL_PRESSUREDlg::OnTypeChange(UINT nID)
{theApp.m_nProductSel = nID - ID_DEF_PRODUCT+1;CWinApp* pApp = AfxGetApp();int i=pApp->WriteProfileInt("参数","nProductSel1",theApp.m_nProductSel);CString str = theApp.m_allPara[theApp.m_nProductSel].m_strTypeName;theApp.typ_name=theApp.m_DataPath+"\\"+str+"\\";CreateDirectory(theApp.typ_name,FALSE);theApp.m_strTypeName= theApp.m_allPara[theApp.m_nProductSel].m_strTypeName;theApp.m_strBrand= theApp.m_allPara[theApp.m_nProductSel].m_strBrand;theApp.m_strRemark= theApp.m_allPara[theApp.m_nProductSel].m_strRemark;theApp.m_edit_min= theApp.m_allPara[theApp.m_nProductSel].m_edit_min;theApp.m_edit_max= theApp.m_allPara[theApp.m_nProductSel].m_edit_max;theApp.m_edit_time1= theApp.m_allPara[theApp.m_nProductSel].m_edit_time1;theApp.m_edit_time2= theApp.m_allPara[theApp.m_nProductSel].m_edit_time2;theApp.m_edit_time1= theApp.m_allPara[theApp.m_nProductSel].m_edit_time1;theApp.m_edit_time2= theApp.m_allPara[theApp.m_nProductSel].m_edit_time2;theApp.m_edit_time3= theApp.m_allPara[theApp.m_nProductSel].m_edit_time3;theApp.m_edit_time4= theApp.m_allPara[theApp.m_nProductSel].m_edit_time4;SetDlgItemText(IDC_STATIC_TYPNAME,theApp.m_strTypeName);CString str1,str2;str1.Format("%3.2f",theApp.m_edit_min);str2.Format("%3.2f",theApp.m_edit_max);SetDlgItemText(IDC_STATIC100,str1);SetDlgItemText(IDC_STATIC102,str2);if (i!=0){m_TES_START.EnableWindow (1);}}

运行程序

关键字:东莞市招标网_seo 是什么_国外网站排名 top100_seo自学网视频教程

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: