bview.cpp

来自「关于玻璃划分的小程序很不完善对这有兴趣的大家讨论讨论」· C++ 代码 · 共 77 行

CPP
77
字号
// BView.cpp : implementation file
//

#include "stdafx.h"
#include "玻璃划分程序.h"
#include "BView.h"

#include "玻璃划分程序Doc.h"
#include "玻璃划分程序View.h"


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

/////////////////////////////////////////////////////////////////////////////
// CBView

IMPLEMENT_DYNCREATE(CBView, CView)

CBView::CBView()
{
}

CBView::~CBView()
{
}


BEGIN_MESSAGE_MAP(CBView, CView)
	//{{AFX_MSG_MAP(CBView)
		// NOTE - the ClassWizard will add and remove mapping macros here.
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBView drawing

void CBView::OnDraw(CDC* pDC)
{
	CMyDoc* pDoc = (CMyDoc*)GetDocument();
   int i=0;
   pDC->Rectangle(0,0,pDoc->m_a[i],pDoc->m_b[i]);

	// TODO: add draw code here
}

/////////////////////////////////////////////////////////////////////////////
// CBView diagnostics

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

void CBView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CBView message handlers

void CBView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CDC* pDC=GetDC();
		CMyDoc* pDoc = (CMyDoc*)GetDocument();
   CBView::OnDraw(pDC);//调用自动重绘函数OnDraw()
   
}

⌨️ 快捷键说明

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