// RealValueDlg.cpp : implementation file
//

#include "stdafx.h"
#include "apl_api.h"
#include "RealValueDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRealValueDlg dialog


CRealValueDlg::CRealValueDlg(CWnd* pParent /*=NULL*/)
	: CaplTranslateDialog(CRealValueDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CRealValueDlg)
	m_val = 0.0;
	m_min_dev = 0.0;
	m_max_dev = 0.0;
	//}}AFX_DATA_INIT
}


void CRealValueDlg::DoDataExchange(CDataExchange* pDX)
{
	CaplTranslateDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CRealValueDlg)
	DDX_Control(pDX, IDC_UNIT, m_unit);
	DDX_Control(pDX, IDCANCEL, m_cancel_btn);
	DDX_Control(pDX, IDOK, m_ok_btn);
	DDX_Text(pDX, IDC_VAL, m_val);
	DDX_Text(pDX, IDC_MIN_DEV, m_min_dev);
	DDX_Text(pDX, IDC_MAX_DEV, m_max_dev);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CRealValueDlg, CaplTranslateDialog)
	//{{AFX_MSG_MAP(CRealValueDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRealValueDlg message handlers

BOOL CRealValueDlg::OnInitDialog() 
{
	CaplTranslateDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_cancel_btn.SetIcon(GetAplStdIco16(APLSTDICO_CANCEL));
	m_cancel_btn.SetFlat(FALSE);
	m_ok_btn.SetIcon(GetAplStdIco16(APLSTDICO_OK));
	m_ok_btn.SetFlat(FALSE);

	m_unit.AddString(m_unit_name);
	m_unit.SelectString(0,m_unit_name);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
