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

📄 vc11view1.cpp

📁 Visual C++ 6.0编程基础与范例
💻 CPP
字号:
// vc11View.cpp : implementation of the CVc11View class
//

#include "stdafx.h"
#include "vc11.h"

#include "vc11Doc.h"
#include "vc11View.h"

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

/////////////////////////////////////////////////////////////////////////////
// CVc11View

IMPLEMENT_DYNCREATE(CVc11View, CEditView)

BEGIN_MESSAGE_MAP(CVc11View, CEditView)
	//{{AFX_MSG_MAP(CVc11View)
	ON_COMMAND(ID_FONT_SETUP, OnFontSetup)
	ON_COMMAND(ID_FILE_PAGE_SETUP, OnFilePageSetup)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CVc11View construction/destruction

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

}

CVc11View::~CVc11View()
{
}

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

	BOOL bPreCreated = CEditView::PreCreateWindow(cs);
	cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL);	// Enable word-wrapping

	return bPreCreated;
}

/////////////////////////////////////////////////////////////////////////////
// CVc11View drawing

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

/////////////////////////////////////////////////////////////////////////////
// CVc11View printing

BOOL CVc11View::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default CEditView preparation
	return CEditView::OnPreparePrinting(pInfo);
}

void CVc11View::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView begin printing.
	CEditView::OnBeginPrinting(pDC, pInfo);
}

void CVc11View::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView end printing
	CEditView::OnEndPrinting(pDC, pInfo);
}

/////////////////////////////////////////////////////////////////////////////
// CVc11View diagnostics

#ifdef _DEBUG
void CVc11View::AssertValid() const
{
	CEditView::AssertValid();
}

void CVc11View::Dump(CDumpContext& dc) const
{
	CEditView::Dump(dc);
}

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

/////////////////////////////////////////////////////////////////////////////
// CVc11View message handlers

void CVc11View::OnPrint(CDC* pDC, CPrintInfo* pInfo) 
{
	// TODO: Add your specialized code here and/or call the base class
	
	CEditView::OnPrint(pDC, pInfo);
}

void CVc11View::OnFontSetup() 
{
	// TODO: Add your command handler code here
	
}

void CVc11View::OnFilePageSetup() 
{
	// TODO: Add your command handler code here
	
}

⌨️ 快捷键说明

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