📄 readme.wzd
字号:
/////////////////////////////////////////////////////////////////////
// Example files.
/////////////////////////////////////////////////////////////////////
WzdInfo1.cpp -- sample data classes that have been enabled to be serialized
WzdInfo1.h
WzdInfo2.cpp
WzdInfo2.h
/////////////////////////////////////////////////////////////////////
// Modify the Document Class.
/////////////////////////////////////////////////////////////////////
// 1) from this class's Serialize() function, call the Serialize() functions
// of all data classes you wish to serialize to disk
void CWzdDoc::Serialize(CArchive& ar)
{
int nCount;
if (ar.IsStoring())
{
nCount = m_WzdInfo1List.GetCount();
ar << nCount;
for (POSITION pos = m_WzdInfo1List.GetHeadPosition(); pos; )
{
CWzdInfo1 *pInfo = m_WzdInfo1List.GetNext(pos);
pInfo->Serialize(ar);
}
}
else
{
ar >> nCount;
while (nCount-- > 0)
{
CWzdInfo1* pInfo = new CWzdInfo1;
pInfo->Serialize(ar);
m_WzdInfo1List.AddTail(pInfo);
}
}
}
// 2) also implement this class's DeleteContents() function to delete any objects
// maintained by this class. This function is called with "New" and "Open" menu
// commands
void CWzdDoc::DeleteContents()
{
// called with new and open document
// opportunity to initialize the data collections that make up our document
while (!m_WzdInfo1List.IsEmpty())
{
delete m_WzdInfo1List.RemoveHead();
}
CDocument::DeleteContents();
}
/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1998 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -