// Indicator2Ppg.cpp : Implementation of the CIndicator2PropPage property page class.

#include "stdafx.h"
#include "Indicator2.h"
#include "Indicator2Ppg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif


IMPLEMENT_DYNCREATE(CIndicator2PropPage, COlePropertyPage)


/////////////////////////////////////////////////////////////////////////////
// Message map

BEGIN_MESSAGE_MAP(CIndicator2PropPage, COlePropertyPage)
	//{{AFX_MSG_MAP(CIndicator2PropPage)
	// NOTE - ClassWizard will add and remove message map entries
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// Initialize class factory and guid

IMPLEMENT_OLECREATE_EX(CIndicator2PropPage, "INDICATOR2.Indicator2PropPage.1",
	0x57b7c172, 0xf6c7, 0x4ff5, 0xa8, 0x72, 0xdb, 0xeb, 0x46, 0x5f, 0x67, 0x6b)


/////////////////////////////////////////////////////////////////////////////
// CIndicator2PropPage::CIndicator2PropPageFactory::UpdateRegistry -
// Adds or removes system registry entries for CIndicator2PropPage

BOOL CIndicator2PropPage::CIndicator2PropPageFactory::UpdateRegistry(BOOL bRegister)
{
	if (bRegister)
		return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
			m_clsid, IDS_INDICATOR2_PPG);
	else
		return AfxOleUnregisterClass(m_clsid, NULL);
}


/////////////////////////////////////////////////////////////////////////////
// CIndicator2PropPage::CIndicator2PropPage - Constructor

CIndicator2PropPage::CIndicator2PropPage() :
	COlePropertyPage(IDD, IDS_INDICATOR2_PPG_CAPTION)
{
	//{{AFX_DATA_INIT(CIndicator2PropPage)
	m_precision = 0;
	m_units = _T("");
	m_type = 0;
	m_alignment = 0;
	m_horizontal = 0;
	//}}AFX_DATA_INIT
}


/////////////////////////////////////////////////////////////////////////////
// CIndicator2PropPage::DoDataExchange - Moves data between page and properties

void CIndicator2PropPage::DoDataExchange(CDataExchange* pDX)
{
	//{{AFX_DATA_MAP(CIndicator2PropPage)
	DDP_Text(pDX, IDC_PRECISION, m_precision, _T("Precision") );
	DDX_Text(pDX, IDC_PRECISION, m_precision);
	DDV_MinMaxInt(pDX, m_precision, 0, 10);
	DDP_Text(pDX, IDC_UNITS, m_units, _T("Units") );
	DDX_Text(pDX, IDC_UNITS, m_units);
	DDV_MaxChars(pDX, m_units, 10);
	DDP_Text(pDX, IDC_TYPE, m_type, _T("Type") );
	DDX_Text(pDX, IDC_TYPE, m_type);
	DDV_MinMaxInt(pDX, m_type, -1, 10);
	DDP_Text(pDX, IDC_ALIGNMENT, m_alignment, _T("Alignment") );
	DDX_Text(pDX, IDC_ALIGNMENT, m_alignment);
	DDV_MinMaxInt(pDX, m_alignment, -1, 1);
	DDP_Text(pDX, IDC_HORIZONTAL, m_horizontal, _T("Horizontal") );
	DDX_Text(pDX, IDC_HORIZONTAL, m_horizontal);
	DDV_MinMaxInt(pDX, m_horizontal, -1, 1);
	//}}AFX_DATA_MAP
	DDP_PostProcessing(pDX);
}


/////////////////////////////////////////////////////////////////////////////
// CIndicator2PropPage message handlers
