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

📄 bmpdocument.cpp

📁 这是《深入浅出MFC》这本书的源代码
💻 CPP
字号:
// BMPDocument.cpp : implementation file
//

#include "stdafx.h"
#include "Example.h"
#include "BMPDocument.h"

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

/////////////////////////////////////////////////////////////////////////////
// CBMPDocument

IMPLEMENT_DYNCREATE(CBMPDocument, CDocument)

CBMPDocument::CBMPDocument()
{
}

BOOL CBMPDocument::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;
	return TRUE;
}

CBMPDocument::~CBMPDocument()
{
}


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

/////////////////////////////////////////////////////////////////////////////
// CBMPDocument diagnostics

#ifdef _DEBUG
void CBMPDocument::AssertValid() const
{
	CDocument::AssertValid();
}

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

/////////////////////////////////////////////////////////////////////////////
// CBMPDocument serialization

void CBMPDocument::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
		CFile *file = ar.GetFile();
		for(int i=0;i<file->GetLength();i++)
		{
			ar >> bmpBit[i];
		}
	}
}

/////////////////////////////////////////////////////////////////////////////
// CBMPDocument commands

⌨️ 快捷键说明

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