📄 wavesdoc.cpp
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -