⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doc.h

📁 《Visual C++ Bible》或者说是《Visual C++ 宝典》的对应的源码文件
💻 H
字号:
// doc.h : interface of the DDoc class
//
/////////////////////////////////////////////////////////////////////////////
#include <afxtempl.h> // Connect to CArray template.

// Structure to track lines in text file.
class STRING  // : public CObject
{
  public:
    LPTSTR pText;
    int    ccLen;
};

// This declaration uses the CArray template 
// to provide a dynamic array of STRING records.
class StringArray : public CArray <STRING, STRING &>
{
  public:
    StringArray() {}
    STRING& operator=(STRING & s)
                       {m_pData->pText = s.pText;
                        m_pData->ccLen = s.ccLen;
                        return *m_pData;}
};

const int g_nTabCount=25;
const int g_nTabStop=4;

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

// Attributes
public:
// ============== Begin Attributes formerly in FILELIST ==============
    LPTSTR        d_lpTextBuffer; // Ptr to text buffer.
    DWORD         d_dwFileLength; // File length.
    StringArray   d_saTextInfo;   // Array of string info.
    int           d_cLines;       // Count of lines in text.
// ============== End Attributes formerly in FILELIST ==============

// Operations
public:
    void BuildStringArray();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(DDoc)
	public:
	virtual BOOL OnNewDocument();
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~DDoc();
	virtual void Serialize(CArchive& ar);   // overridden for document i/o
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(DDoc)
		// 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()
};

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

⌨️ 快捷键说明

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