// 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 scnrderiver,std::string scnrcompany,std::string scnrdesigner,std::string scnraddress,std::string serialNum,std::string hardVersion,CWnd* pParent /*=NULL*/) : CDialog(IDD_DIALOGABOUT, pParent) { this->scanHardVersion=hardVersion; this->scanName=scnrname; this->scanSerialNum=serialNum; this->scanDeriver=scnrderiver; this->scanCompany=scnrcompany; this->scanDesigner=scnrdesigner; this->scanAddress=scnraddress; } AboutHuaGoDlg::~AboutHuaGoDlg() { } void AboutHuaGoDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //DDX_Control(pDX,IDC_PICABOUTHUAGO,m_pic); DDX_Control(pDX, IDC_PICABOUTHUAGO, m_PicLogo); } BEGIN_MESSAGE_MAP(AboutHuaGoDlg, CDialog) END_MESSAGE_MAP() // AboutHuaGoDlg 消息处理程序 BOOL AboutHuaGoDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: 在此添加额外的初始化 if(scanName == "Hi-5100"|| scanName == "G300" || scanName == "G400" ) { m_bitmap.LoadBitmap(IDB_BMPABOUTDLG); } else { m_bitmap.LoadBitmap(IDB_BMPABOUTDLGZ); } 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()); ((CStatic*)GetDlgItem(IDC_LBDERIVERVERSON))->SetWindowText(scanDeriver.c_str()); ((CStatic*)GetDlgItem(IDC_LBCOMPANY))->SetWindowText(scanCompany.c_str()); ((CStatic*)GetDlgItem(IDC_LBDESIGNERVALUE))->SetWindowText(scanDesigner.c_str()); ((CStatic*)GetDlgItem(IDC_LBADDRESSVALUE))->SetWindowText(scanAddress.c_str()); m_PicLogo.SetBitmap((HBITMAP)m_bitmap); }