wavesdoc.cpp

来自「西安电子科技大学王亚民教授所著《组态软件设计与开发》附带的源代码07章」· C++ 代码 · 共 85 行

CPP
85
字号
// WavesDoc.cpp : implementation of the CWavesDoc class
//

#include "stdafx.h"
#include "Waves.h"

#include "WavesDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CWavesDoc

IMPLEMENT_DYNCREATE(CWavesDoc, CDocument)

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

/////////////////////////////////////////////////////////////////////////////
// CWavesDoc construction/destruction

CWavesDoc::CWavesDoc()
{
	// TODO: add one-time construction code here

}

CWavesDoc::~CWavesDoc()
{
}

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

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)
    m_wave.Create(10);
	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CWavesDoc serialization

void CWavesDoc::Serialize(CArchive& ar)
{
    if (ar.IsStoring()) {
        ASSERT(1);
    } else {
        CFile* fp = ar.GetFile();
        ASSERT(fp);
        ar.Flush();
        m_wave.Load(fp);
    }
}

/////////////////////////////////////////////////////////////////////////////
// CWavesDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CWavesDoc commands

⌨️ 快捷键说明

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