You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
3.1 KiB
C++
137 lines
3.1 KiB
C++
//////////////////////////////////////////////////////////////////////////////
|
|
//Îļþ: ScaleSelectPage.h
|
|
//Ö÷Òª¹¦ÄÜ:
|
|
//
|
|
//³ÌÐò±àд: 2006-12-07
|
|
//
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// ScaleSelectPage.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
//#include "DFDrawPro.h"
|
|
#include "ScaleSelectPage.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CScaleSelectPage property page
|
|
|
|
IMPLEMENT_DYNCREATE(CScaleSelectPage, CPropertyPage)
|
|
|
|
CScaleSelectPage::CScaleSelectPage() : CPropertyPage(CScaleSelectPage::IDD)
|
|
{
|
|
//{{AFX_DATA_INIT(CScaleSelectPage)
|
|
m_bXnotY = FALSE;
|
|
m_xscale = _T("10000");
|
|
m_yscale = _T("10000");
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
CScaleSelectPage::~CScaleSelectPage()
|
|
{
|
|
}
|
|
|
|
void CScaleSelectPage::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CPropertyPage::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(CScaleSelectPage)
|
|
DDX_Check(pDX, IDC_CHECK_XY, m_bXnotY);
|
|
DDX_CBString(pDX, IDC_COMBO_xscale, m_xscale);
|
|
DDX_CBString(pDX, IDC_COMBO_yscale, m_yscale);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CScaleSelectPage, CPropertyPage)
|
|
//{{AFX_MSG_MAP(CScaleSelectPage)
|
|
ON_CBN_SELCHANGE(IDC_COMBO_xscale, OnSelchangeCOMBOxscale)
|
|
ON_CBN_EDITCHANGE(IDC_COMBO_yscale, OnEditchangeCOMBOyscale)
|
|
ON_CBN_SELCHANGE(IDC_COMBO_yscale, OnSelchangeCOMBOyscale)
|
|
ON_CBN_EDITCHANGE(IDC_COMBO_xscale, OnEditchangeCOMBOxscale)
|
|
ON_BN_CLICKED(IDC_CHECK_XY, OnCheckXy)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CScaleSelectPage message handlers
|
|
|
|
LRESULT CScaleSelectPage::OnWizardNext()
|
|
{
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
|
|
return CPropertyPage::OnWizardNext();
|
|
}
|
|
|
|
LRESULT CScaleSelectPage::OnWizardBack()
|
|
{
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
|
|
return CPropertyPage::OnWizardBack();
|
|
}
|
|
|
|
BOOL CScaleSelectPage::OnWizardFinish()
|
|
{
|
|
// TODO: Add your specialized code here and/or call the base class
|
|
|
|
return CPropertyPage::OnWizardFinish();
|
|
}
|
|
|
|
void CScaleSelectPage::OnSelchangeCOMBOxscale()
|
|
{
|
|
}
|
|
|
|
void CScaleSelectPage::OnEditchangeCOMBOyscale()
|
|
{
|
|
}
|
|
|
|
void CScaleSelectPage::OnSelchangeCOMBOyscale()
|
|
{
|
|
}
|
|
|
|
void CScaleSelectPage::OnEditchangeCOMBOxscale()
|
|
{
|
|
}
|
|
|
|
BOOL CScaleSelectPage::OnInitDialog()
|
|
{
|
|
CPropertyPage::OnInitDialog();
|
|
|
|
m_psp.dwFlags &= ~PSH_HASHELP;
|
|
if(m_xscale != m_yscale) m_bXnotY = TRUE;
|
|
UpdateData(FALSE);
|
|
OnCheckXy();
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void CScaleSelectPage::OnCheckXy()
|
|
{
|
|
UpdateData();
|
|
if(m_bXnotY) GetDlgItem(IDC_COMBO_yscale)->EnableWindow(TRUE);
|
|
else GetDlgItem(IDC_COMBO_yscale)->EnableWindow(FALSE);
|
|
}
|
|
|
|
void CScaleSelectPage::OnOK()
|
|
{
|
|
if(!m_bXnotY) m_yscale = m_xscale;
|
|
|
|
CPropertyPage::OnOK();
|
|
}
|
|
|
|
BOOL CScaleSelectPage::OnSetActive()
|
|
{
|
|
CPropertySheet* pSheet = (CPropertySheet*)GetParent();
|
|
ASSERT_KINDOF(CPropertySheet, pSheet);
|
|
pSheet->SetWizardButtons( PSWIZB_BACK | PSWIZB_NEXT | PSWIZB_FINISH);
|
|
|
|
return CPropertyPage::OnSetActive();
|
|
}
|