twain2/hugaotwainds/AboutHuaGoDlg.cpp

74 lines
2.0 KiB
C++
Raw Permalink Normal View History

2020-03-11 02:53:30 +00:00
// AboutHuaGoDlg.cpp : ʵ<><CAB5><EFBFBD>ļ<EFBFBD>
//
#include "stdafx.h"
#include "hugaotwainds.h"
#include "AboutHuaGoDlg.h"
#include "afxdialogex.h"
// AboutHuaGoDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
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 <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
BOOL AboutHuaGoDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: <20>ڴ<EFBFBD><DAB4><EFBFBD><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD>ij<EFBFBD>ʼ<EFBFBD><CABC>
if(scanName == "Hi-5100"|| scanName == "G300" || scanName == "G400" )
2020-03-11 02:53:30 +00:00
{
m_bitmap.LoadBitmap(IDB_BMPABOUTDLG);
}
else
{
m_bitmap.LoadBitmap(IDB_BMPABOUTDLGZ);
}
UpdateScannerInfo();
return TRUE; // return TRUE unless you set the focus to a control
// <20>쳣: OCX <20><><EFBFBD><EFBFBD>ҳӦ<D2B3><D3A6><EFBFBD><EFBFBD> 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);
}