home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Large Pack of OldSkool DOS MOD Trackers
/
beaversweeper_v101.zip
/
src
/
PropPageEditor.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2003-01-06
|
3KB
|
103 lines
// PropPageEditor.cpp : implementation file
//
#include "stdafx.h"
#include "tracker.h"
#include "PropPageEditor.h"
#include "Configuration.h"
#include "Globals.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPropPageEditor property page
IMPLEMENT_DYNCREATE(CPropPageEditor, CPropertyPage)
CPropPageEditor::CPropPageEditor() : CPropertyPage(CPropPageEditor::IDD)
{
//{{AFX_DATA_INIT(CPropPageEditor)
m_patposadd = 0;
m_chanposadd = 0;
//}}AFX_DATA_INIT
}
CPropPageEditor::~CPropPageEditor()
{
}
void CPropPageEditor::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropPageEditor)
DDX_Text(pDX, IDC_EDIT1, m_patposadd);
DDV_MinMaxInt(pDX, m_patposadd, 0, 256);
DDX_Text(pDX, IDC_EDIT2, m_chanposadd);
DDV_MinMaxInt(pDX, m_chanposadd, 0, 256);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPropPageEditor, CPropertyPage)
//{{AFX_MSG_MAP(CPropPageEditor)
ON_EN_CHANGE(IDC_EDIT2, OnChangeEdit2)
ON_EN_CHANGE(IDC_EDIT1, OnChangeEdit1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPropPageEditor message handlers
BOOL CPropPageEditor::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// TODO: Add extra initialization here
m_patposadd = g_patposadd;
m_chanposadd = g_chanposadd;
UpdateData(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CPropPageEditor::OnChangeEdit2()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CPropertyPage::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
SetModified(TRUE);
}
void CPropPageEditor::OnChangeEdit1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CPropertyPage::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
SetModified(TRUE);
}
BOOL CPropPageEditor::OnApply()
{
UpdateData(TRUE);
// TODO: Add your specialized code here and/or call the base class
g_patposadd = m_patposadd;
g_chanposadd = m_chanposadd;
CONFIGURATION_SETDWORD( _T("Editor"), _T("PatPosAdd"), g_patposadd );
CONFIGURATION_SETDWORD( _T("Editor"), _T("ChanPosAdd"), g_chanposadd );
return CPropertyPage::OnApply();
}