📄 employdoc.cpp
字号:
// EmployDoc.cpp : implementation of the CEmployDoc class
//
#include "stdafx.h"
#include "Employ.h"
#include "EmployDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEmployDoc
IMPLEMENT_DYNCREATE(CEmployDoc, CDocument)
BEGIN_MESSAGE_MAP(CEmployDoc, CDocument)
//{{AFX_MSG_MAP(CEmployDoc)
ON_UPDATE_COMMAND_UI(IDM_SORT, OnUpdateSort)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEmployDoc construction/destruction
CEmployDoc::CEmployDoc()
{
// TODO: add one-time construction code here
}
CEmployDoc::~CEmployDoc()
{
}
BOOL CEmployDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CEmployDoc serialization
void CEmployDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO: add storing code here
}
else
{
// TODO: add loading code here
}
m_Sys.Serialize(ar);
}
/////////////////////////////////////////////////////////////////////////////
// CEmployDoc diagnostics
#ifdef _DEBUG
void CEmployDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CEmployDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEmployDoc commands
void CEmployDoc::DeleteContents()
{
// TODO: Add your specialized code here and/or call the base class
m_Sys.DeleteAll();
CDocument::DeleteContents();
}
void CEmployDoc::OnUpdateSort(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
if(m_Sys.GetCount()==0)
pCmdUI->Enable(FALSE);
else
pCmdUI->Enable();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -