splashview.cpp

来自「《突破Visual C++.NET编程实例五十讲+源文件,初学者学习的好东东!」· C++ 代码 · 共 100 行

CPP
100
字号
// SplashView.cpp : CSplashView class类的实现
//

#include "stdafx.h"
#include "Splash.h"

#include "SplashDoc.h"
#include "SplashView.h"

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



// CSplashView

IMPLEMENT_DYNCREATE(CSplashView, CView)

BEGIN_MESSAGE_MAP(CSplashView, CView)

	// 标准打印命令
	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()



//CViewScrollView 构造/销毁

CSplashView::CSplashView()
{
	// TODO: 在此处添加构造代码

}

CSplashView::~CSplashView()
{
}

BOOL CSplashView::PreCreateWindow(CREATESTRUCT& cs)
{

	// TODO: 在此处通过修改 CREATESTRUCT cs 来修改窗口类或
	// 样式
	return CView::PreCreateWindow(cs);
}


// CViewScrollView 绘制

void CSplashView::OnDraw(CDC* pDC)
{
	CSplashDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	
}

// CViewScrollView 打印

BOOL CSplashView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// 默认准备
	return DoPreparePrinting(pInfo);
}

void CSplashView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: 打印前添加额外的初始化
}

void CSplashView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: 打印后添加清除过程
}

// CViewScrollView  诊断
#ifdef _DEBUG
void CSplashView::AssertValid() const
{
	CView::AssertValid();
}

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

CSplashDoc* CSplashView::GetDocument() // 非调试版本是内联的
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSplashDoc)));
	return (CSplashDoc*)m_pDocument;
}
#endif 


// CViewScrollView 消息处理程序

⌨️ 快捷键说明

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