📄 dlgpageother.cpp
字号:
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// DlgPageOther.cpp : implementation file
//
////////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "simulator.h"
#include "DlgPageOther.h"
#include "myglobals.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgPageOther property page
IMPLEMENT_DYNCREATE(CDlgPageOther, CPropertyPage)
CDlgPageOther::CDlgPageOther() : CPropertyPage(CDlgPageOther::IDD)
{
//{{AFX_DATA_INIT(CDlgPageOther)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CDlgPageOther::~CDlgPageOther()
{
}
void CDlgPageOther::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgPageOther)
DDX_Control(pDX, IDC_ISTEP, m_intStep);
DDX_Control(pDX, IDC_SPIN_MASS, m_spinBoxMass);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgPageOther, CPropertyPage)
//{{AFX_MSG_MAP(CDlgPageOther)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgPageOther message handlers
BOOL CDlgPageOther::OnInitDialog()
{
CString aux;
CPropertyPage::OnInitDialog();
m_spinBoxMass.SetRange32(0,50000);
m_spinBoxMass.SetPos(BoxMass);
aux.Format("%10.7f",intStep);
m_intStep.SetWindowText(aux);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CDlgPageOther::OnOK()
{
CString aux;
BoxMass = m_spinBoxMass.GetPos();
m_intStep.GetWindowText(aux);
intStep = atof(aux);
CPropertyPage::OnOK();
}
void CDlgPageOther::OnCancel()
{
CString aux;
m_spinBoxMass.SetPos(BoxMass);
aux.Format("%10.7f",intStep);
m_intStep.SetWindowText(aux);
CPropertyPage::OnCancel();
}
BOOL CDlgPageOther::OnApply()
{
CString aux;
BoxMass = m_spinBoxMass.GetPos();
m_intStep.GetWindowText(aux);
intStep = atof(aux);
return CPropertyPage::OnApply();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -