#include "stdafx.h"
#include "pgl/PGL.h"
#include "pgl/PGLMapVectorPropPage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
IMPLEMENT_DYNCREATE(CPGLMapVectorPropPage, CPropertyPage)
CPGLMapVectorPropPage::CPGLMapVectorPropPage(CPGLMapVector* pMapVector) : CPropertyPage(CPGLMapVectorPropPage::IDD)
{
m_dLineWidth = 0.0;
m_pMapVector = pMapVector;
}
CPGLMapVectorPropPage::~CPGLMapVectorPropPage()
{
}
void CPGLMapVectorPropPage::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
DDX_Text(pDX, IDC_PGL_EDIT_LINEWIDTH, m_dLineWidth);
}
BEGIN_MESSAGE_MAP(CPGLMapVectorPropPage, CPropertyPage)
END_MESSAGE_MAP()
BOOL CPGLMapVectorPropPage::OnSetActive()
{
ASSERT_VALID(m_pMapVector);
m_dLineWidth = m_pMapVector->GetLineWidth();
UpdateData(FALSE);
return CPropertyPage::OnSetActive();
}
BOOL CPGLMapVectorPropPage::OnKillActive()
{
ASSERT_VALID(m_pMapVector);
UpdateData(TRUE);
m_pMapVector->SetLineWidth(m_dLineWidth);
return CPropertyPage::OnKillActive();
}