📄 doc.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 + -