vc08doc.h

来自「Visual C++ 6.0编程基础与范例」· C头文件 代码 · 共 82 行

H
82
字号
// vc08Doc.h : interface of the CVc08Doc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_VC08DOC_H__81F13F2D_0265_11D3_A012_0060085A8930__INCLUDED_)
#define AFX_VC08DOC_H__81F13F2D_0265_11D3_A012_0060085A8930__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CPrice : public CObject
{
protected:
	CPrice()
	{}
	DECLARE_SERIAL(CPrice)
	
public:
	CString	m_Name;
	float	m_Price;
	CPrice(CString name,float price);
	virtual void Serialize(CArchive&ar);
};

class CVc08Doc : public CDocument
{
protected: // create from serialization only
	CVc08Doc();
	DECLARE_DYNCREATE(CVc08Doc)

// Attributes
public:

public:
	void SaveRec(int index,CString name,float price);
	void AddRec(CString name,float price);
	void DelRec(int index);
	CPrice *GetRec(int index);
	int GetTotalRec();
	virtual void DeleteContents();

public:
	CObArray m_RecArray;
	
// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CVc08Doc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CVc08Doc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CVc08Doc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_VC08DOC_H__81F13F2D_0265_11D3_A012_0060085A8930__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?