📄 dlgconstants.cpp
字号:
//////////////////////////////////////////////////////////////////////
// MuRoS - Multi Robot Simulator
//
// Luiz Chaimowicz
// GRASP Lab. University of Pennsylvania
// VERLab - DCC - UFMG - Brasil
//
// DlgConstants.cpp : implementation file
//
///////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "simulator.h"
#include "DlgConstants.h"
#include "myglobals.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDlgConstants
IMPLEMENT_DYNAMIC(CDlgConstants, CPropertySheet)
CDlgConstants::CDlgConstants():CPropertySheet()
{
}
CDlgConstants::CDlgConstants(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
{
}
CDlgConstants::CDlgConstants(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
{
m_pageCollision = new CDlgPageCollision();
m_pagePotential = new CDlgPagePotential();
m_pageVelocity = new CDlgPageVelocity();
m_pageOther = new CDlgPageOther();
AddPage(m_pageCollision);
AddPage(m_pagePotential);
AddPage(m_pageVelocity);
AddPage(m_pageOther);
}
CDlgConstants::~CDlgConstants()
{
}
BEGIN_MESSAGE_MAP(CDlgConstants, CPropertySheet)
//{{AFX_MSG_MAP(CDlgConstants)
// NOTE - the ClassWizard will add and remove mapping macros here.
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK, OnOK)
ON_BN_CLICKED(IDCANCEL, OnCancel)
ON_BN_CLICKED(ID_APPLY, OnApply)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDlgConstants message handlers
BOOL CDlgConstants::OnInitDialog()
{
BOOL bResult = CPropertySheet::OnInitDialog();
// Openning space for the buttons;
CRect rectWnd;
GetWindowRect(rectWnd);
SetWindowPos(&wndTopMost, 0, 0, rectWnd.Width(), rectWnd.Height()+30, SWP_NOMOVE | SWP_NOACTIVATE);
m_bOK.Create("OK", WS_CHILD | WS_VISIBLE | WS_TABSTOP, CRect(7, rectWnd.Height()-22, 82, rectWnd.Height()-2), this, IDOK );
m_bOK.SetFont( GetFont() );
m_bCancel.Create("Cancel", WS_CHILD | WS_VISIBLE | WS_TABSTOP, CRect(87, rectWnd.Height()-22, 162, rectWnd.Height()-2), this, IDCANCEL );
m_bCancel.SetFont( GetFont() );
m_bApply.Create("Apply", WS_CHILD | WS_VISIBLE | WS_TABSTOP, CRect(167, rectWnd.Height()-22, 242, rectWnd.Height()-2), this, ID_APPLY );
m_bApply.SetFont( GetFont() );
CenterWindow();
return bResult;
}
void CDlgConstants::OnOK()
{
PressButton(PSBTN_OK);
DestroyWindow();
}
void CDlgConstants::OnCancel()
{
PressButton(PSBTN_CANCEL);
DestroyWindow();
}
void CDlgConstants::OnApply()
{
PressButton(PSBTN_APPLYNOW);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -