📄 shopinglistdoc.cpp
字号:
// ShopingListDoc.cpp : implementation of the CShopingListDoc class
//
#include "stdafx.h"
#include "ShopingList.h"
#include "ShopingListDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CShopingListDoc
IMPLEMENT_DYNCREATE(CShopingListDoc, CDocument)
BEGIN_MESSAGE_MAP(CShopingListDoc, CDocument)
//{{AFX_MSG_MAP(CShopingListDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CShopingListDoc construction/destruction
CShopingListDoc::CShopingListDoc()
{
}
CShopingListDoc::~CShopingListDoc()
{
}
BOOL CShopingListDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// ja - set the default names for the store headers
m_sStoreNames.Add(_T("Store 1"));
m_sStoreNames.Add(_T("Store 2"));
m_sStoreNames.Add(_T("Store 3"));
m_sStoreNames.Add(_T("Store 4"));
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CShopingListDoc serialization
void CShopingListDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
}
else
{
}
//ja - we will serialize our CStringArrays here
m_Qty.Serialize(ar);
m_sProductName.Serialize(ar);
m_fStore1Price.Serialize(ar);
m_fStore2Price.Serialize(ar);
m_fStore3Price.Serialize(ar);
m_fStore4Price.Serialize(ar);
m_sStoreNames.Serialize(ar);
SetModifiedFlag(FALSE);
}
/////////////////////////////////////////////////////////////////////////////
// CShopingListDoc diagnostics
#ifdef _DEBUG
void CShopingListDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CShopingListDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CShopingListDoc commands
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -