www.pudn.com > russion_vc.zip > Dlg.cpp
// Dlg.cpp : implementation file
//
#include "stdafx.h"
#include "Russion.h"
#include "Dlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// EntranceDlg dialog
EntranceDlg::EntranceDlg(CWnd* pParent /*=NULL*/)
: CDialog(EntranceDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(EntranceDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void EntranceDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(EntranceDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(EntranceDlg, CDialog)
//{{AFX_MSG_MAP(EntranceDlg)
ON_BN_CLICKED(IDC_BUTTON_OPTION, OnButtonOption)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// EntranceDlg message handlers
/////////////////////////////////////////////////////////////////////////////
// OptionDlg dialog
OptionDlg::OptionDlg(CWnd* pParent /*=NULL*/)
: CDialog(OptionDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(OptionDlg)
m_speed = 0;
//}}AFX_DATA_INIT
}
void OptionDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(OptionDlg)
DDX_Control(pDX, IDC_SPIN1, m_spin);
DDX_Text(pDX, IDC_EDIT1, m_speed);
DDV_MinMaxInt(pDX, m_speed, 1, 10);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(OptionDlg, CDialog)
//{{AFX_MSG_MAP(OptionDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// OptionDlg message handlers
void EntranceDlg::OnButtonOption()
{
// TODO: Add your control notification handler code here
OptionDlg Odlg;
Odlg.DoModal();
}
void OptionDlg::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
BOOL OptionDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_spin.SetBase(10);
m_spin.SetRange(1,10);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}