591 lines
19 KiB
C++
591 lines
19 KiB
C++
// DLG_Corp_LXR_PrintHT.cpp : implementation file
|
||
//
|
||
|
||
#include "stdafx.h"
|
||
#include "smsmanager.h"
|
||
#include "DLG_Corp_LXR_PrintHT.h"
|
||
|
||
#ifdef _DEBUG
|
||
#define new DEBUG_NEW
|
||
#undef THIS_FILE
|
||
static char THIS_FILE[] = __FILE__;
|
||
#endif
|
||
|
||
/////////////////////////////////////////////////////////////////////////////
|
||
// DLG_Corp_LXR_PrintHT dialog
|
||
|
||
|
||
DLG_Corp_LXR_PrintHT::DLG_Corp_LXR_PrintHT(CWnd* pParent /*=NULL*/)
|
||
: CDialog(DLG_Corp_LXR_PrintHT::IDD, pParent)
|
||
{
|
||
//{{AFX_DATA_INIT(DLG_Corp_LXR_PrintHT)
|
||
m_strAgentName = _T("");
|
||
m_strAgentNo = _T("");
|
||
m_strCorpAddr = _T("");
|
||
m_strCorpCFD = _T("");
|
||
m_strCorpDB = _T("");
|
||
m_strCorpFax = _T("");
|
||
m_strCorpHY = _T("");
|
||
m_strCorpLXDH = _T("");
|
||
m_strCorpLXR = _T("");
|
||
m_strCorpLXRJW = _T("");
|
||
m_strCorpName = _T("");
|
||
m_strCorpPostCode = _T("");
|
||
m_strCorpJS = _T("");
|
||
m_strCorpYGS = _T("");
|
||
m_strCorpZJHM = _T("");
|
||
m_strFuncAdmin = _T("");
|
||
m_strFuncAgent = _T("");
|
||
m_strFuncSmsCode = _T("");
|
||
m_bFuncBD = FALSE;
|
||
m_strFuncCM = _T("");
|
||
m_bFuncCW = FALSE;
|
||
m_bFuncDel = FALSE;
|
||
m_strFuncEmail = _T("");
|
||
m_strFuncMobile = _T("");
|
||
m_bFuncMobile = FALSE;
|
||
m_bFuncReset = FALSE;
|
||
m_strFuncTel = _T("");
|
||
m_bFuncType = FALSE;
|
||
m_lCorpZJType = -1;
|
||
m_bFuncAdd = FALSE;
|
||
m_lTC = -1;
|
||
m_lTCMon = -1;
|
||
m_lTCYear = -1;
|
||
m_tDateSL = COleDateTime::GetCurrentTime();
|
||
m_tDateGJ = COleDateTime::GetCurrentTime();
|
||
//}}AFX_DATA_INIT
|
||
}
|
||
|
||
|
||
void DLG_Corp_LXR_PrintHT::DoDataExchange(CDataExchange* pDX)
|
||
{
|
||
CDialog::DoDataExchange(pDX);
|
||
//{{AFX_DATA_MAP(DLG_Corp_LXR_PrintHT)
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_AGENTNAME, m_strAgentName);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_AGENTNO, m_strAgentNo);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPADDR, m_strCorpAddr);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPCFD, m_strCorpCFD);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPDB, m_strCorpDB);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPFAX, m_strCorpFax);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPHY, m_strCorpHY);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPLXDH, m_strCorpLXDH);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPLXR, m_strCorpLXR);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPLXRJW, m_strCorpLXRJW);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPNAME, m_strCorpName);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPPOSTCODE, m_strCorpPostCode);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPSJS, m_strCorpJS);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPYGS, m_strCorpYGS);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_CORPZJHM, m_strCorpZJHM);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_FUNCADMIN, m_strFuncAdmin);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_FUNCAGENT, m_strFuncAgent);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_FUNCASMSCODE, m_strFuncSmsCode);
|
||
DDX_Check(pDX, IDC_CORP_LXRPRINTHT_FUNCBD, m_bFuncBD);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_FUNCCM, m_strFuncCM);
|
||
DDX_Check(pDX, IDC_CORP_LXRPRINTHT_FUNCCW, m_bFuncCW);
|
||
DDX_Check(pDX, IDC_CORP_LXRPRINTHT_FUNCDEL, m_bFuncDel);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_FUNCEMAIL, m_strFuncEmail);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_FUNCMOBILE, m_strFuncMobile);
|
||
DDX_Check(pDX, IDC_CORP_LXRPRINTHT_FUNCMODIFY, m_bFuncMobile);
|
||
DDX_Check(pDX, IDC_CORP_LXRPRINTHT_FUNCRESET, m_bFuncReset);
|
||
DDX_Text(pDX, IDC_CORP_LXRPRINTHT_FUNCTEL, m_strFuncTel);
|
||
DDX_Check(pDX, IDC_CORP_LXRPRINTHT_FUNCTYPE, m_bFuncType);
|
||
DDX_CBIndex(pDX, IDC_CORP_LXRPRINTHT_CORPZJTYPE, m_lCorpZJType);
|
||
DDX_Check(pDX, IDC_CORP_LXRPRINTHT_FUNCADD, m_bFuncAdd);
|
||
DDX_CBIndex(pDX, IDC_CORP_LXRPRINTHT_TC, m_lTC);
|
||
DDX_CBIndex(pDX, IDC_CORP_LXRPRINTHT_TCMON, m_lTCMon);
|
||
DDX_CBIndex(pDX, IDC_CORP_LXRPRINTHT_TCYEAR, m_lTCYear);
|
||
DDX_DateTimeCtrl(pDX, IDC_CORP_LXRPRINTHT_DATESL, m_tDateSL);
|
||
DDX_DateTimeCtrl(pDX, IDC_CORP_LXRPRINTHT_DATEGJ, m_tDateGJ);
|
||
//}}AFX_DATA_MAP
|
||
}
|
||
|
||
|
||
BEGIN_MESSAGE_MAP(DLG_Corp_LXR_PrintHT, CDialog)
|
||
//{{AFX_MSG_MAP(DLG_Corp_LXR_PrintHT)
|
||
ON_BN_CLICKED(IDC_CORP_LXRPRINT_SF3, OnCorpLxrprintSf3)
|
||
ON_BN_CLICKED(IDC_CORP_LXRPRINT_SF, OnCorpLxrprintSf)
|
||
//}}AFX_MSG_MAP
|
||
END_MESSAGE_MAP()
|
||
|
||
/////////////////////////////////////////////////////////////////////////////
|
||
// DLG_Corp_LXR_PrintHT message handlers
|
||
|
||
BOOL DLG_Corp_LXR_PrintHT::OnInitDialog()
|
||
{
|
||
CDialog::OnInitDialog();
|
||
|
||
UpdateData(false);
|
||
|
||
return TRUE; // return TRUE unless you set the focus to a control
|
||
// EXCEPTION: OCX Property Pages should return FALSE
|
||
}
|
||
|
||
void DLG_Corp_LXR_PrintHT::OnCorpLxrprintSf3()
|
||
{
|
||
if ( !UpdateData(true) )
|
||
return;
|
||
|
||
try
|
||
{
|
||
|
||
//Ԥ<><D4A4>
|
||
CPrnFrame * PrnFrame = new CPrnFrame(On_Print2,On_BeginPrint2,OnPreparePrinting2,this,this,false);
|
||
PrnFrame->ShowWindow(SW_SHOW);
|
||
PrnFrame->UpdateWindow();
|
||
|
||
//<2F><>ӡ
|
||
//CPrnFrame * PrnFrame = new CPrnFrame(On_Print2,On_BeginPrint2,this,this,true);
|
||
}
|
||
catch( ...)
|
||
{
|
||
AfxMessageBox( _T("print error") );
|
||
}
|
||
}
|
||
|
||
void DLG_Corp_LXR_PrintHT::OnCorpLxrprintSf()
|
||
{
|
||
if ( !UpdateData(true) )
|
||
return;
|
||
|
||
|
||
try
|
||
{
|
||
//<2F><>ӡ
|
||
CPrnFrame * PrnFrame = new CPrnFrame(On_Print2,On_BeginPrint2,OnPreparePrinting2,this,this,true);
|
||
}
|
||
catch( ...)
|
||
{
|
||
AfxMessageBox( _T("print error") );
|
||
}
|
||
}
|
||
|
||
void DLG_Corp_LXR_PrintHT::On_Print2(CDC *pDC, CPrintInfo *pInfo, void *pVoid)
|
||
{
|
||
DLG_Corp_LXR_PrintHT * pDlg = (DLG_Corp_LXR_PrintHT *)pVoid;
|
||
|
||
|
||
CFont font,fontb,fontm,fontm2,*oldfont;
|
||
CPoint point;
|
||
int nWidth=pDC->GetDeviceCaps(HORZRES);
|
||
int nHeight=pDC->GetDeviceCaps(VERTRES);
|
||
int xLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSX);
|
||
int yLogPixPerInch = pDC->GetDeviceCaps(LOGPIXELSY);
|
||
float xmm = ((float)xLogPixPerInch/24.5f);
|
||
float ymm = ((float)yLogPixPerInch/24.5f);
|
||
|
||
font.CreateFont(-MulDiv(12,-pDC->GetDeviceCaps(LOGPIXELSY),72),
|
||
0,0,0,FW_NORMAL,0,0,0,GB2312_CHARSET,
|
||
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
|
||
VARIABLE_PITCH|FF_SWISS,_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||
fontm.CreateFont(-MulDiv(16,-pDC->GetDeviceCaps(LOGPIXELSY),72),
|
||
0,0,0,FW_NORMAL,0,0,0,GB2312_CHARSET,
|
||
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
|
||
VARIABLE_PITCH|FF_SWISS,_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||
fontm2.CreateFont(-MulDiv(10,-pDC->GetDeviceCaps(LOGPIXELSY),72),
|
||
0,0,0,FW_NORMAL,0,0,0,GB2312_CHARSET,
|
||
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
|
||
VARIABLE_PITCH|FF_SWISS,_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||
|
||
fontb.CreateFont(-MulDiv(24,-pDC->GetDeviceCaps(LOGPIXELSY),72),
|
||
0,0,0,FW_NORMAL,0,0,0,GB2312_CHARSET,
|
||
OUT_STROKE_PRECIS,CLIP_STROKE_PRECIS,DRAFT_QUALITY,
|
||
VARIABLE_PITCH|FF_SWISS,_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||
|
||
float lxAdd=-7.0f;
|
||
float lyAdd=0.0f;
|
||
|
||
float fLeft=56.0f;
|
||
float fTop=46.0f;
|
||
long x=0,y=0,w=0,h=0;
|
||
long x2=0,y2=0,w2=0,h2=0;
|
||
CString str;
|
||
|
||
oldfont=pDC->SelectObject(&font);
|
||
//<2F><>ӡ<EFBFBD><D3A1><EFBFBD>ݵ<EFBFBD>
|
||
x=(long)(((float)(58.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(47.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(75.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
pDC->DrawText(pDlg->m_strAgentName,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>
|
||
x=(long)(((float)(157.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(47.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(35.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strAgentNo,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(65.5f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(58.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(126.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpName,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(65.5f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(64.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(48.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpDB,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//Ա<><D4B1><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(150.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(64.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(40.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpYGS,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ
|
||
oldfont=pDC->SelectObject(&fontm2);
|
||
x=(long)(((float)(65.5f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(70.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(60.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpHY,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
oldfont=pDC->SelectObject(&font);
|
||
//<2F>ֻ<EFBFBD><D6BB><EFBFBD>
|
||
x=(long)(((float)(150.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(70.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(40.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpJS,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><>ϵ<EFBFBD><CFB5>
|
||
x=(long)(((float)(65.5f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(76.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(48.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpLXR,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><>ϵ<EFBFBD><CFB5>ְ<EFBFBD><D6B0>
|
||
x=(long)(((float)(150.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(76.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(40.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpLXRJW,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><>ϵ<EFBFBD>绰
|
||
x=(long)(((float)(65.5f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(81.8f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(70.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpLXDH,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(150.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(81.8f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(40.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpFax,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
|
||
//֤<><D6A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
y=(long)(((float)(88.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
|
||
x=0;
|
||
switch( pDlg->m_lCorpZJType )
|
||
{
|
||
case 0:
|
||
x=(long)(((float)(67.0f+lxAdd))*xmm+0.5f);
|
||
break;
|
||
case 1:
|
||
x=(long)(((float)(84.0f+lxAdd))*xmm+0.5f);
|
||
break;
|
||
case 2:
|
||
x=(long)(((float)(99.5f+lxAdd))*xmm+0.5f);
|
||
break;
|
||
case 3:
|
||
x=(long)(((float)(113.0f+lxAdd))*xmm+0.5f);
|
||
break;
|
||
case 4:
|
||
x=(long)(((float)(133.5f+lxAdd))*xmm+0.5f);
|
||
break;
|
||
}
|
||
if ( x>0 )
|
||
{
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
//ǩ<><C7A9><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(159.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(88.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(40.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpCFD,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
|
||
//<2F><><EFBFBD><EFBFBD>֤<EFBFBD><D6A4><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(66.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(95.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(6.6f))*xmm+0.5f);
|
||
h=(long)(((float)(7.0f))*ymm+0.5f);
|
||
|
||
long x1;
|
||
for (int i=0 ; i<pDlg->m_strCorpZJHM.GetLength()&& i<18 ; i++ )
|
||
{
|
||
x1 = x+(long)(((float)(7.0f))*xmm*(float)i+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpZJHM.GetAt(i),&pDlg->MakeRect(x1,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
|
||
//ͨѶ<CDA8><D1B6>ַ
|
||
oldfont=pDC->SelectObject(&fontm2);
|
||
x=(long)(((float)(65.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(100.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(64.0f))*xmm+0.5f);
|
||
h=(long)(((float)(15.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpAddr,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER|DT_WORDBREAK);
|
||
|
||
oldfont=pDC->SelectObject(&font);
|
||
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(148.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(101.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(7.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.7f))*ymm+0.5f);
|
||
|
||
for (i=0 ; i<pDlg->m_strCorpZJHM.GetLength()&& i<6 ; i++ )
|
||
{
|
||
x1 = x+(long)(((float)(7.0f))*xmm*(float)i+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpPostCode.GetAt(i),&pDlg->MakeRect(x1,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
|
||
//ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
if ( pDlg->m_bFuncType )
|
||
{
|
||
x=(long)(((float)(53.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(113.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
|
||
//<2F><>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(108.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(114.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(20.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strFuncAgent,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ,ȫ<><C8AB>
|
||
if ( pDlg->m_bFuncCW )
|
||
{
|
||
x=(long)(((float)(53.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(119.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Χ,<2C><><EFBFBD><EFBFBD>
|
||
if ( pDlg->m_bFuncBD )
|
||
{
|
||
x=(long)(((float)(71.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(119.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
oldfont=pDC->SelectObject(&fontm2);
|
||
x=(long)(((float)(79.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(126.0f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(28.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strFuncSmsCode,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
oldfont=pDC->SelectObject(&font);
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD>ײ<EFBFBD>
|
||
if ( pDlg->m_bFuncAdd )
|
||
{
|
||
x=(long)(((float)(106.5f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(125.2f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
//<2F><><EFBFBD><EFBFBD>
|
||
if ( pDlg->m_bFuncMobile )
|
||
{
|
||
x=(long)(((float)(130.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(125.2f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
//<2F><><EFBFBD><EFBFBD>
|
||
if ( pDlg->m_bFuncDel )
|
||
{
|
||
x=(long)(((float)(153.5f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(125.2f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
//<2F><><EFBFBD><EFBFBD>
|
||
if ( pDlg->m_bFuncDel )
|
||
{
|
||
x=(long)(((float)(170.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(125.2f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
|
||
//<2F><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д
|
||
x=(long)(((float)(59.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(130.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(45.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strFuncCM,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(64.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(136.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(42.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strFuncAdmin,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD>Ա<EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD>
|
||
x=(long)(((float)(135.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(136.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(45.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strFuncMobile,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD>Ա<EFBFBD>̶<EFBFBD><CCB6>绰
|
||
x=(long)(((float)(64.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(142.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(42.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strFuncTel,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
//<2F><><EFBFBD><EFBFBD>ԱEmail
|
||
x=(long)(((float)(135.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(142.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(45.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strFuncEmail,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
|
||
//<2F>ײͼƻ<CDBC>
|
||
|
||
x =(long)(((float)(33.0f+lxAdd))*xmm+0.5f);
|
||
x1=(long)(((float)(159.0f+lxAdd))*xmm+0.5f);
|
||
x2=(long)(((float)(172.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(164.0f+lyAdd))*ymm+0.5f);
|
||
if ( pDlg->m_lTC<=6 )
|
||
{
|
||
//ѡ<>ײ<EFBFBD>
|
||
y=y+(long)(5.7f*(float)(pDlg->m_lTC)*ymm+0.5f);
|
||
w=(long)(((float)(5.0f))*xmm+0.5f);
|
||
h=(long)(((float)(5.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<EFBFBD><EFBFBD>"),&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
|
||
//д<><D0B4>
|
||
if ( pDlg->m_lTCYear < 20 )
|
||
{
|
||
str.Format( _T("%04d") , pDlg->m_lTCYear+2000 );
|
||
w=(long)(((float)(10.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(str,&pDlg->MakeRect(x1,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
//д<><D0B4>
|
||
if ( pDlg->m_lTCMon<12 )
|
||
{
|
||
str.Format( _T("%02d") , pDlg->m_lTCMon+1 );
|
||
w=(long)(((float)(10.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(str,&pDlg->MakeRect(x2,y,w,h),DT_LEFT|DT_VCENTER);
|
||
}
|
||
}
|
||
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
if ( pDlg->m_tDateSL.GetStatus()==0 )
|
||
{
|
||
str.Format( _T("%04d %02d %02d") , pDlg->m_tDateSL.GetYear(),pDlg->m_tDateSL.GetMonth(),pDlg->m_tDateSL.GetDay());
|
||
|
||
x=(long)(((float)(68.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(253.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(45.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(str,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
|
||
}
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
if ( pDlg->m_tDateGJ.GetStatus()==0 )
|
||
{
|
||
str.Format( _T("%04d %02d %02d") , pDlg->m_tDateGJ.GetYear(),pDlg->m_tDateGJ.GetMonth(),pDlg->m_tDateGJ.GetDay());
|
||
|
||
x=(long)(((float)(149.0f+lxAdd))*xmm+0.5f);
|
||
y=(long)(((float)(253.5f+lyAdd))*ymm+0.5f);
|
||
w=(long)(((float)(45.0f))*xmm+0.5f);
|
||
h=(long)(((float)(6.0f))*ymm+0.5f);
|
||
pDC->DrawText(str,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_VCENTER);
|
||
|
||
}
|
||
|
||
/*
|
||
oldfont=pDC->SelectObject(&fontm);
|
||
//<2F><>ӡ<EFBFBD><D3A1>ַ
|
||
x=(long)(((float)(15.0f))*xmm+0.5f);
|
||
y=(long)(((float)(25.0f))*ymm+0.5f);
|
||
w=(long)(((float)(160.0f))*xmm+0.5f);
|
||
h=(long)(((float)(9.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strAddress,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_TOP|DT_SINGLELINE);
|
||
//<2F><>ӡ<EFBFBD><D3A1>˾<EFBFBD><CBBE><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(30.0f))*xmm+0.5f);
|
||
y=(long)(((float)(35.0f))*ymm+0.5f);
|
||
w=(long)(((float)(155.0f))*xmm+0.5f);
|
||
h=(long)(((float)(9.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpName,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_TOP|DT_SINGLELINE);
|
||
//<2F><>ӡ<EFBFBD>ռ<EFBFBD><D5BC><EFBFBD>
|
||
x=(long)(((float)(20.0f))*xmm+0.5f);
|
||
y=(long)(((float)(45.0f))*ymm+0.5f);
|
||
w=(long)(((float)(155.0f))*xmm+0.5f);
|
||
h=(long)(((float)(9.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<22>ռ<EFBFBD><D5BC>ˣ<EFBFBD>")+pDlg->m_strLXR,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_TOP|DT_SINGLELINE);
|
||
//<2F><>ӡ<EFBFBD>绰
|
||
x=(long)(((float)(20.0f))*xmm+0.5f);
|
||
y=(long)(((float)(55.0f))*ymm+0.5f);
|
||
w=(long)(((float)(155.0f))*xmm+0.5f);
|
||
h=(long)(((float)(9.0f))*ymm+0.5f);
|
||
pDC->DrawText(_T("<22><><EFBFBD>绰<EFBFBD><E7BBB0>")+pDlg->m_strTelNum,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_TOP|DT_SINGLELINE);
|
||
|
||
|
||
//<2F><>ӡ<EFBFBD><D3A1>β-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˾
|
||
x=(long)(((float)(130.0f))*xmm+0.5f);
|
||
y=(long)(((float)(75.0f))*ymm+0.5f);
|
||
w=(long)(((float)(100.0f))*xmm+0.5f);
|
||
h=(long)(((float)(9.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strCorpName2,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_TOP|DT_SINGLELINE);
|
||
|
||
oldfont=pDC->SelectObject(&font);
|
||
//<2F><>ӡ<EFBFBD><D3A1>β-<2D><>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>
|
||
x=(long)(((float)(123.0f))*xmm+0.5f);
|
||
y=(long)(((float)(82.0f))*ymm+0.5f);
|
||
w=(long)(((float)(100.0f))*xmm+0.5f);
|
||
h=(long)(((float)(25.0f))*ymm+0.5f);
|
||
pDC->DrawText(pDlg->m_strAddress2,&pDlg->MakeRect(x,y,w,h),DT_LEFT|DT_TOP);
|
||
}
|
||
*/
|
||
|
||
pDC->SelectObject(oldfont);
|
||
font.DeleteObject();
|
||
fontb.DeleteObject();
|
||
}
|
||
|
||
void DLG_Corp_LXR_PrintHT::On_BeginPrint2(CDC *pDC, CPrintInfo *pInfo, void *pVoid)
|
||
{
|
||
|
||
}
|
||
|
||
void DLG_Corp_LXR_PrintHT::OnPreparePrinting2(CPrintInfo *pInfo)
|
||
{
|
||
pInfo->SetMaxPage(1); //ֻ<><D6BB>1ҳ
|
||
/*
|
||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||
CWinApp* pApp = AfxGetApp();
|
||
pApp->GetPrinterDeviceDefaults(&pInfo->m_pPD->m_pd);
|
||
if ( pInfo )
|
||
{
|
||
LPDEVMODE lpDevmode = pInfo->m_pPD->GetDevMode();
|
||
if ( lpDevmode )
|
||
{
|
||
lpDevmode->dmOrientation = DMORIENT_LANDSCAPE;
|
||
}
|
||
}
|
||
*/
|
||
}
|
||
|
||
RECT DLG_Corp_LXR_PrintHT::MakeRect(long x, long y, long w, long h)
|
||
{
|
||
RECT rect={x,y,x+w,y+h};
|
||
return rect;
|
||
}
|