dlgpagevelocity.cpp

来自「多机器人合作中的动态角色分配仿真算法是多机器人合作领域的一个比较著名的仿真软件」· C++ 代码 · 共 106 行

CPP
106
字号
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// DlgPageVelocity.cpp : implementation file
//
/////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "simulator.h"
#include "DlgPageVelocity.h"
#include "myglobals.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgPageVelocity property page

IMPLEMENT_DYNCREATE(CDlgPageVelocity, CPropertyPage)

CDlgPageVelocity::CDlgPageVelocity() : CPropertyPage(CDlgPageVelocity::IDD)
{
	//{{AFX_DATA_INIT(CDlgPageVelocity)
	//}}AFX_DATA_INIT
}

CDlgPageVelocity::~CDlgPageVelocity()
{
}

void CDlgPageVelocity::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgPageVelocity)
	DDX_Control(pDX, IDC_SPIN_DBW, m_spinDBW);
	DDX_Control(pDX, IDC_SPIN_DR, m_spinDR);
	DDX_Control(pDX, IDC_SPIN_DB, m_spinDB);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgPageVelocity, CPropertyPage)
	//{{AFX_MSG_MAP(CDlgPageVelocity)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgPageVelocity message handlers

BOOL CDlgPageVelocity::OnInitDialog() 
{
	CString aux;

	CPropertyPage::OnInitDialog();
	
	m_spinDR.SetRange32(0,50000);
	m_spinDB.SetRange32(0,50000);
	m_spinDBW.SetRange32(0,50000);;

	m_spinDR.SetPos(Cr);
	m_spinDB.SetPos(Cb);
	m_spinDBW.SetPos(Cbw);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgPageVelocity::OnOK() 
{
	CString aux;

	Cr = m_spinDR.GetPos();
	Cb = m_spinDB.GetPos();
	Cbw = m_spinDBW.GetPos();
	
	CPropertyPage::OnOK();
}

BOOL CDlgPageVelocity::OnApply() 
{
	CString aux;

	Cr = m_spinDR.GetPos();
	Cb = m_spinDB.GetPos();
	Cbw = m_spinDBW.GetPos();
	
	return CPropertyPage::OnApply();
}

void CDlgPageVelocity::OnCancel() 
{
	CString aux;

	m_spinDR.SetPos(Cr);
	m_spinDB.SetPos(Cb);
	m_spinDBW.SetPos(Cbw);
	
	CPropertyPage::OnCancel();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?