⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drawmalthusview.cpp

📁 这是一个可以画出马尔萨斯引力线图的源程序.可以在vc环境下运行.
💻 CPP
字号:
// DrawMalthusView.cpp : implementation of the CDrawMalthusView class
//

#include "stdafx.h"
#include "DrawMalthus.h"

#include "DrawMalthusDoc.h"
#include "DrawMalthusView.h"
#include "Malthus.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDrawMalthusView

IMPLEMENT_DYNCREATE(CDrawMalthusView, CView)

BEGIN_MESSAGE_MAP(CDrawMalthusView, CView)
	//{{AFX_MSG_MAP(CDrawMalthusView)
	ON_COMMAND(ID_DRAWMALTHUS1, OnDrawmalthus1)
	ON_COMMAND(ID_DRAWMALTHUS2, OnDrawmalthus2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDrawMalthusView construction/destruction

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

}

CDrawMalthusView::~CDrawMalthusView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CDrawMalthusView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CDrawMalthusView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CDrawMalthusView message handlers

void CDrawMalthusView::OnDrawmalthus1() 
{
	// TODO: Add your command handler code here
	CDC* pDC;
	pDC=this->GetDC();
	CMalthus s_Malthus(pDC);
	s_Malthus.Draw();
}

void CDrawMalthusView::OnDrawmalthus2() 
{
	// TODO: Add your command handler code here
	CDC* pDC;
	pDC=this->GetDC();
	CMalthus s_Malthus(pDC);
	s_Malthus.Draw1();	
}

⌨️ 快捷键说明

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