?? textviewerdoc.cpp
字號:
// TextViewerDoc.cpp : CTextViewerDoc 類的實現
//
#include "stdafx.h"
#include "TextViewer.h"
#include "TextViewerDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CTextViewerDoc
IMPLEMENT_DYNCREATE(CTextViewerDoc, CDocument)
BEGIN_MESSAGE_MAP(CTextViewerDoc, CDocument)
END_MESSAGE_MAP()
// CTextViewerDoc 構造/銷毀
CTextViewerDoc::CTextViewerDoc()
{
// TODO:在此添加一次性構造代碼
}
CTextViewerDoc::~CTextViewerDoc()
{
}
BOOL CTextViewerDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
// TODO:在此添加重新初始化代碼
// (SDI 文檔將重用該文檔)
return TRUE;
}
// CTextViewerDoc 序列化
void CTextViewerDoc::Serialize(CArchive& ar)
{
if (ar.IsStoring())
{
// TODO:在此添加存儲代碼
}
else
{
// TODO:在此添加加載代碼
CString str;
while ( ar.ReadString( str ) )
{
m_strContent.Add( str ); // 將行文本添加到字符串集合類對象中
}
}
}
// CTextViewerDoc 診斷
#ifdef _DEBUG
void CTextViewerDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CTextViewerDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
// CTextViewerDoc 命令
void CTextViewerDoc::DeleteContents()
{
// TODO: 在此添加專用代碼和/或調用基類
m_strContent.RemoveAll(); // 清除集合類對象中的內容
CDocument::DeleteContents(); // 框加自動添加的基類調用
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -