feifeidoc.cpp

来自「C++数字图像源代码」· C++ 代码 · 共 95 行

CPP
95
字号
// feifeiDoc.cpp : implementation of the CFeifeiDoc class
//

#include "stdafx.h"
#include "feifei.h"

#include "feifeiDoc.h"

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

extern UINT gScale;
extern BOOL gAdjust;
/////////////////////////////////////////////////////////////////////////////
// CFeifeiDoc

IMPLEMENT_DYNCREATE(CFeifeiDoc, CDocument)

BEGIN_MESSAGE_MAP(CFeifeiDoc, CDocument)
	//{{AFX_MSG_MAP(CFeifeiDoc)
	
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFeifeiDoc construction/destruction

CFeifeiDoc::CFeifeiDoc()
{
	// TODO: add one-time construction code here
    m_buf=NULL;				// where we keep our image data
	m_width=0;				// image dimensions
	m_height=0;
	m_widthDW=0;
}

CFeifeiDoc::~CFeifeiDoc()
{
	if (m_buf!=NULL) {
		delete [] m_buf;
		m_buf=NULL;
	}

}

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

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

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CFeifeiDoc serialization

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

/////////////////////////////////////////////////////////////////////////////
// CFeifeiDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CFeifeiDoc commands

⌨️ 快捷键说明

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