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

📄 v7view.cpp

📁 这里可以熟悉下APPFACE的用法
💻 CPP
字号:
// V7View.cpp : implementation of the CV7View class
//

#include "stdafx.h"
#include "V7.h"

#include "V7Doc.h"
#include "V7View.h"

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

/////////////////////////////////////////////////////////////////////////////
// CV7View

IMPLEMENT_DYNCREATE(CV7View, CView)

BEGIN_MESSAGE_MAP(CV7View, CView)
	//{{AFX_MSG_MAP(CV7View)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}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)
	ON_MESSAGE(WM_MYMSG, OnMyMessage)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CV7View construction/destruction

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

}

CV7View::~CV7View()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CV7View drawing

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

/////////////////////////////////////////////////////////////////////////////
// CV7View printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CV7View diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CV7View message handlers
void CV7View::OnMyMessage(UINT MLFlag,UINT MHFlag)
{
	CDC *pDC;
	pDC = GetDC();

	CString str;
	int i = MLFlag;

	str.Format("Index is %d",i);

	pDC->TextOut(200,200,str);
}

⌨️ 快捷键说明

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