📄 doc.cpp
字号:
// doc.cpp : implementation of the CClientDoc class
//
#include "stdafx.h"
#include "client.h"
#include "view.h"
#include "doc.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CClientDoc
IMPLEMENT_DYNCREATE(CClientDoc, CDocument)
BEGIN_MESSAGE_MAP(CClientDoc, CDocument)
//{{AFX_MSG_MAP(CClientDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CClientDoc construction/destruction
CClientDoc::CClientDoc()
{
// TODO: add one-time construction code here
}
CClientDoc::~CClientDoc()
{
}
BOOL CClientDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CClientDoc serialization
void CClientDoc::Serialize(CArchive& ar)
{
POSITION pos=GetFirstViewPosition();
CClientView *View=(CClientView *)GetNextView(pos);
if (ar.IsStoring())
{
View->SaveData(ar);
}
else
{
View->LoadData(ar);
}
}
/////////////////////////////////////////////////////////////////////////////
// CClientDoc diagnostics
#ifdef _DEBUG
void CClientDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CClientDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CClientDoc commands
void CClientDoc::DeleteContents()
{
POSITION pos=GetFirstViewPosition();
CClientView *View=(CClientView *)GetNextView(pos);
if(View!=NULL)
View->ResetContent();
CDocument::DeleteContents();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -