drawview.cpp

来自「希望大家多多交流」· C++ 代码 · 共 167 行

CPP
167
字号
// drawView.cpp : implementation of the CDrawView class
//

#include "stdafx.h"
#include "draw.h"

#include "drawDoc.h"
#include "drawView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDrawView

IMPLEMENT_DYNCREATE(CDrawView, CView)

BEGIN_MESSAGE_MAP(CDrawView, CView)
	//{{AFX_MSG_MAP(CDrawView)
	ON_COMMAND(ID_BUTTON32771, OnButton32771)
	ON_COMMAND(ID_BUTTON32772, OnButton32772)
	ON_COMMAND(ID_BUTTON32773, OnButton32773)
	ON_COMMAND(ID_BUTTON32774, OnButton32774)
	ON_COMMAND(ID_BUTTON32775, OnButton32775)
	ON_COMMAND(ID_BUTTON32776, OnButton32776)
	ON_COMMAND(ID_BUTTON32777, OnButton32777)
	ON_COMMAND(ID_BUTTON32778, OnButton32778)
	ON_COMMAND(ID_BUTTON32779, OnButton32779)
	//}}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()

/////////////////////////////////////////////////////////////////////////////
// CDrawView construction/destruction

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

}

CDrawView::~CDrawView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CDrawView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CDrawView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CDrawView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CDrawView message handlers

void CDrawView::OnButton32771() 
{
	// TODO: Add your command handler code here
	index=10;
}

void CDrawView::OnButton32772() 
{
	// TODO: Add your command handler code here
	index=20;
	
}

void CDrawView::OnButton32773() 
{
	// TODO: Add your command handler code here
	index=30;
}

void CDrawView::OnButton32774() 
{
	// TODO: Add your command handler code here
	index=40;
}

void CDrawView::OnButton32775() 
{
	// TODO: Add your command handler code here
	index=50;
}

void CDrawView::OnButton32776() 
{
	// TODO: Add your command handler code here
	index=60;
}

void CDrawView::OnButton32777() 
{
	// TODO: Add your command handler code here
	index=70;
}

void CDrawView::OnButton32778() 
{
	// TODO: Add your command handler code here
	index=80;
}

void CDrawView::OnButton32779() 
{
	// TODO: Add your command handler code here
	index=90;
}

⌨️ 快捷键说明

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