patterndoc.cpp

来自「本人的模式识别课程VC源程序」· C++ 代码 · 共 93 行

CPP
93
字号
// PatternDoc.cpp : implementation of the CPatternDoc class
//

#include "stdafx.h"
#include "Pattern.h"

#include "PatternDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CPatternDoc

IMPLEMENT_DYNCREATE(CPatternDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CPatternDoc construction/destruction

CPatternDoc::CPatternDoc()
{
	// TODO: add one-time construction code here
// 默认背景色,白色
	m_refColorBKG =0x00ffffff;	
	// 初始化变量
	m_hDIB = NULL;
	m_palDIB = NULL;
	m_sizeDoc = CSize(1,1);

}

CPatternDoc::~CPatternDoc()
{


}

BOOL CPatternDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CPatternDoc serialization

void CPatternDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CPatternDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CPatternDoc commands

⌨️ 快捷键说明

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