gifview.cpp

来自「Visual C++ 的学习资料一」· C++ 代码 · 共 105 行

CPP
105
字号
// GIFView.cpp : implementation of the CGIFView class
//

#include "stdafx.h"
#include "GIF.h"

#include "GIFDoc.h"
#include "GIFView.h"

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

/////////////////////////////////////////////////////////////////////////////
// CGIFView

IMPLEMENT_DYNCREATE(CGIFView, CView)

BEGIN_MESSAGE_MAP(CGIFView, CView)
	//{{AFX_MSG_MAP(CGIFView)
		// 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)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CGIFView construction/destruction

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

}

CGIFView::~CGIFView()
{
}

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

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CGIFView drawing

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

/////////////////////////////////////////////////////////////////////////////
// CGIFView printing

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CGIFView diagnostics

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

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

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

/////////////////////////////////////////////////////////////////////////////
// CGIFView message handlers

⌨️ 快捷键说明

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