📄 ex07adoc.cpp
字号:
// Ex07aDoc.cpp : implementation of the CEx07aDoc class
//
#include "stdafx.h"
#include "Ex07a.h"
#include "Ex07aDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEx07aDoc
IMPLEMENT_DYNCREATE(CEx07aDoc, CDocument)
BEGIN_MESSAGE_MAP(CEx07aDoc, CDocument)
//{{AFX_MSG_MAP(CEx07aDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CEx07aDoc construction/destruction
CEx07aDoc::CEx07aDoc()
{
curPos=0;
}
CEx07aDoc::~CEx07aDoc()
{
}
BOOL CEx07aDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CEx07aDoc serialization
void CEx07aDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
}
/////////////////////////////////////////////////////////////////////////////
// CEx07aDoc diagnostics
#ifdef _DEBUG
void CEx07aDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CEx07aDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEx07aDoc commands
IMPLEMENT_DYNCREATE(CStudent,CObject)
CStudent::CStudent()
{
m_nCode=0;
m_sName="NoNAME";
m_nAge=0;
m_lScore=0.0;
m_lScore2=0;
m_lScore3=0;
}
CStudent::CStudent(int code,CString name,int age,double score,double score2, double score3)
{
m_nCode=code;
m_sName=name;
m_nAge=age;
m_lScore=score;
m_lScore2=score2;
m_lScore3=score3;
}
void CEx07aDoc::DeleteContents()
{
while(!m_dataList.IsEmpty())
delete m_dataList.RemoveHead();
CDocument::DeleteContents();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -