Files
envi-code/SourceCode/Code2026/tg_shs/shs_public/EditFloorRectDlg.cpp
T
2026-09-28 15:28:50 +08:00

70 lines
1.3 KiB
C++

#include "stdafx.h"
#include "EditFloorRectDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CEditFloorRectDlg::CEditFloorRectDlg(CWnd* pParent /*=NULL*/)
: CDialog(CEditFloorRectDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CEditFloorRectDlg)
m_sFloorName = _T("");
m_dFloorHeight = 0.0;
//}}AFX_DATA_INIT
}
void CEditFloorRectDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CEditFloorRectDlg)
DDX_Text(pDX, IDC_EDIT_NAME, m_sFloorName);
DDX_Text(pDX, IDC_EDIT_HEIGHT, m_dFloorHeight);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CEditFloorRectDlg, CDialog)
//{{AFX_MSG_MAP(CEditFloorRectDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CEditFloorRectDlg::SetFloorName( const CString &sFloorName )
{
m_sFloorName = sFloorName;
}
CString CEditFloorRectDlg::GetFloorName() const
{
return m_sFloorName;
}
void CEditFloorRectDlg::SetFloorHeight( double dFloorHeight )
{
m_dFloorHeight = dFloorHeight;
}
double CEditFloorRectDlg::GetFloorHeight() const
{
return m_dFloorHeight;
}
BOOL CEditFloorRectDlg::OnInitDialog()
{
CDialog::OnInitDialog();
if (m_dFloorHeight < 1000)
{
CWnd *pWnd = GetDlgItem(IDC_STATIC_UNIT);
if (pWnd != NULL)
{
pWnd->SetWindowText(_T("m"));
}
}
return TRUE;
}