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

83 lines
1.9 KiB
C++

// NewSheetDlg.cpp : implementation file
//
#include "stdafx.h"
#include "resource.h"
#include "NewSheetDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CNewSheetDlg dialog
CNewSheetDlg::CNewSheetDlg(CWnd* pParent /*=NULL*/)
: CModelessDialog(CNewSheetDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CNewSheetDlg)
m_nColNum = 0;
m_csColWidth = _T("");
m_csRowHeight = _T("");
m_csTitle = _T("上华表格");
m_nRowNum = 0;
m_bAllowChHeight=TRUE;
//}}AFX_DATA_INIT
}
void CNewSheetDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CNewSheetDlg)
DDX_Text(pDX, IDC_COLNUM, m_nColNum);
DDV_MinMaxUInt(pDX, m_nColNum, 1, 255);
DDX_Text(pDX, IDC_COLWIDTH, m_csColWidth);
if(pDX->m_bSaveAndValidate && _tstof(m_csColWidth)<1.0E-3)
pDX->Fail();
DDX_Text(pDX, IDC_ROWHEIGHT, m_csRowHeight);
if(pDX->m_bSaveAndValidate && _tstof(m_csRowHeight)<1.0E-3)
pDX->Fail();
DDX_Text(pDX, IDC_TITLE, m_csTitle);
DDX_Text(pDX, IDC_ROWNUM, m_nRowNum);
DDV_MinMaxUInt(pDX, m_nRowNum, 1, 10000);
DDX_Check(pDX, IDC_ALLOW_CHHEIGHT, m_bAllowChHeight);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CNewSheetDlg, CModelessDialog)
//{{AFX_MSG_MAP(CNewSheetDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CNewSheetDlg message handlers
BOOL CNewSheetDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CNewSheetDlg::OnOK()
{
// TODO: Add extra validation here
UpdateData(TRUE);
if(_tstof(m_csRowHeight)<1.0E-5 ||
_tstof(m_csColWidth)<1.0E-5) {
AfxMessageBox(_T("请正确输入参数!"), MB_OK);
}
CDialog::OnOK();
}