emluatorview.cpp

来自「兔子狐狸生态平衡模拟器」· C++ 代码 · 共 110 行

CPP
110
字号
// emluatorView.cpp : implementation of the CEmluatorView class
//

#include "stdafx.h"
#include "emluator.h"

#include "emluatorDoc.h"
#include "emluatorView.h"
#include "Emulator.h"

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

/////////////////////////////////////////////////////////////////////////////
// CEmluatorView

IMPLEMENT_DYNCREATE(CEmluatorView, CView)

BEGIN_MESSAGE_MAP(CEmluatorView, CView)
	//{{AFX_MSG_MAP(CEmluatorView)
	ON_COMMAND(ID_EMULATOR, OnEmulator)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CEmluatorView construction/destruction

CEmluatorView::CEmluatorView()
{
	// TODO: add construction code here

}

CEmluatorView::~CEmluatorView()
{
}

BOOL CEmluatorView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CEmluatorView drawing

void CEmluatorView::OnDraw(CDC* pDC)
{
	CEmluatorDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CEmluatorView printing

BOOL CEmluatorView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CEmluatorView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CEmluatorView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CEmluatorView diagnostics

#ifdef _DEBUG
void CEmluatorView::AssertValid() const
{
	CView::AssertValid();
}

void CEmluatorView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CEmluatorDoc* CEmluatorView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CEmluatorDoc)));
	return (CEmluatorDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CEmluatorView message handlers

void CEmluatorView::OnEmulator() 
{
	EmulatorMain();
}

⌨️ 快捷键说明

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