Files
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

101 lines
1.8 KiB
C++

#include "stdafx.h"
#include "FZPDDlg.h"
#include "uihistory.h"
IMPLEMENT_DYNAMIC(CFZPDDlg, CDialog)
CFZPDDlg::CFZPDDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFZPDDlg::IDD, pParent)
, m_dLx(2100)
, m_dLy(450)
, m_dW(3000)
, m_dSideW(300)
, m_dTopEl(450)
, m_bAlignL(FALSE)
, m_bAlignR(FALSE)
, m_bNonslip(FALSE)
{
GET_CACHE(CFZPDDlg
, %f % f % f % f % f % d % d % d
, &m_dLx
, &m_dLy
, &m_dW
, &m_dSideW
, &m_dTopEl
, &m_bAlignL
, &m_bAlignR
, &m_bNonslip);
}
CFZPDDlg::~CFZPDDlg()
{
}
void CFZPDDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT1, m_dLx);
DDX_Text(pDX, IDC_EDIT2, m_dLy);
DDX_Text(pDX, IDC_EDIT3, m_dW);
DDX_Text(pDX, IDC_EDIT6, m_dSideW);
DDX_Text(pDX, IDC_EDIT10, m_dTopEl);
DDX_Check(pDX, IDC_CHECK1, m_bAlignL);
DDX_Check(pDX, IDC_CHECK2, m_bAlignR);
DDX_Check(pDX, IDC_CHECK6, m_bNonslip);
}
BEGIN_MESSAGE_MAP(CFZPDDlg, CDialog)
ON_BN_CLICKED(IDOK, &CFZPDDlg::OnBnClickedOk)
END_MESSAGE_MAP()
BOOL CFZPDDlg::OnInitDialog()
{
CDialog::OnInitDialog();
UpdateData(FALSE);
return TRUE;
}
void CFZPDDlg::OnBnClickedOk()
{
if (!UpdateData(TRUE))
return;
SET_CACHE(CFZPDDlg
, %f % f % f % f % f % d % d % d
, m_dLx
, m_dLy
, m_dW
, m_dSideW
, m_dTopEl
, m_bAlignL
, m_bAlignR
, m_bNonslip);
OnOK();
}
void CFZPDDlg::GetAscentData(AscentData& data) const
{
data.dLx = m_dLx;
data.dLy = m_dLy;
data.dW = m_dW;
data.dSideW = m_dSideW;
data.dTopEl = m_dTopEl;
data.bAlignL = m_bAlignL;
data.bAlignR = m_bAlignR;
data.bNonslip = m_bNonslip;
}
void CFZPDDlg::SetAscentData(AscentData &data)
{
m_dLx = data.dLx;
m_dLy = data.dLy;
m_dW = data.dW;
m_dSideW = data.dSideW;
m_dTopEl = data.dTopEl;
m_bAlignL = data.bAlignL;
m_bAlignR = data.bAlignR;
m_bNonslip = data.bNonslip;
}