// AboutHuaGoDlg.cpp : 实现文件 // #include "stdafx.h" #include "hugaotwainds.h" #include "AboutHuaGoDlg.h" #include "afxdialogex.h" // AboutHuaGoDlg 对话框 IMPLEMENT_DYNAMIC(AboutHuaGoDlg, CDialog) AboutHuaGoDlg::AboutHuaGoDlg(std::string scnrname,std::string serialNum,std::string hardVersion,CWnd* pParent /*=NULL*/) : CDialog(IDD_DIALOGABOUT, pParent) { this->scanHardVersion=hardVersion; this->scanName=scnrname; this->scanSerialNum=serialNum; } AboutHuaGoDlg::~AboutHuaGoDlg() { } void AboutHuaGoDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //DDX_Control(pDX,IDC_PICABOUTHUAGO,m_pic); } BEGIN_MESSAGE_MAP(AboutHuaGoDlg, CDialog) END_MESSAGE_MAP() // AboutHuaGoDlg 消息处理程序 BOOL AboutHuaGoDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: 在此添加额外的初始化 UpdateScannerInfo(); return TRUE; // return TRUE unless you set the focus to a control // 异常: OCX 属性页应返回 FALSE } void AboutHuaGoDlg::UpdateScannerInfo() { ((CStatic*)GetDlgItem(IDC_LBSCANNERNAMEVALUE))->SetWindowText(scanName.c_str()); ((CStatic*)GetDlgItem(IDC_LBSERIALNUMVALUE))->SetWindowText(scanSerialNum.c_str()); ((CStatic*)GetDlgItem(IDC_LBHARDWAREVALUE))->SetWindowText(scanHardVersion.c_str()); }