📄 textreaddoc.cpp
字号:
// TextReadDoc.cpp : implementation of the CTextReadDoc class
//
#include "stdafx.h"
#include "TextRead.h"
#include "TextReadDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTextReadDoc
IMPLEMENT_DYNCREATE(CTextReadDoc, CDocument)
BEGIN_MESSAGE_MAP(CTextReadDoc, CDocument)
//{{AFX_MSG_MAP(CTextReadDoc)
// 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()
BEGIN_DISPATCH_MAP(CTextReadDoc, CDocument)
//{{AFX_DISPATCH_MAP(CTextReadDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
// Note: we add support for IID_ITextRead to support typesafe binding
// from VBA. This IID must match the GUID that is attached to the
// dispinterface in the .ODL file.
// {A5BD6FF5-DCB1-43D3-9EB7-24447A06312F}
static const IID IID_ITextRead =
{ 0xa5bd6ff5, 0xdcb1, 0x43d3, { 0x9e, 0xb7, 0x24, 0x44, 0x7a, 0x6, 0x31, 0x2f } };
BEGIN_INTERFACE_MAP(CTextReadDoc, CDocument)
INTERFACE_PART(CTextReadDoc, IID_ITextRead, Dispatch)
END_INTERFACE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTextReadDoc construction/destruction
CTextReadDoc::CTextReadDoc()
{
// TODO: add one-time construction code here
EnableAutomation();
AfxOleLockApp();
}
CTextReadDoc::~CTextReadDoc()
{
AfxOleUnlockApp();
}
BOOL CTextReadDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
((CEditView*)m_viewList.GetHead())->SetWindowText(NULL);
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CTextReadDoc serialization
void CTextReadDoc::Serialize(CArchive& ar)
{
// CEditView contains an edit control which handles all serialization
((CEditView*)m_viewList.GetTail())->SerializeRaw(ar);
}
/////////////////////////////////////////////////////////////////////////////
// CTextReadDoc diagnostics
#ifdef _DEBUG
void CTextReadDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CTextReadDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CTextReadDoc commands
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -