📄 lz_textdoc.cpp
字号:
/*-----------------------------------------------
* Copyright (c) 2003, Extreme Programming Team
* All rights reserved.
*
* 文件名称:Lz_TextDoc.cpp
* 摘 要:Windows 程序开发BCG界面简单C++实现案例
*
* 当前版本:1.0
* 作 者:L.Z.Jia / E P T.
* 完成日期:22:29 2003-3-8
------------------------------------------------*/
#include "stdafx.h"
#include "Lz_Text.h"
#include "Lz_TextDoc.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLz_TextDoc
IMPLEMENT_DYNCREATE(CLz_TextDoc, CDocument)
BEGIN_MESSAGE_MAP(CLz_TextDoc, CDocument)
//{{AFX_MSG_MAP(CLz_TextDoc)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CLz_TextDoc construction/destruction
CLz_TextDoc::CLz_TextDoc()
{
// TODO: add one-time construction code here
}
CLz_TextDoc::~CLz_TextDoc()
{
}
BOOL CLz_TextDoc::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;
}
/////////////////////////////////////////////////////////////////////////////
// CLz_TextDoc serialization
void CLz_TextDoc::Serialize(CArchive& ar)
{
// CEditView contains an edit control which handles all serialization
((CEditView*)m_viewList.GetHead())->SerializeRaw(ar);
}
/////////////////////////////////////////////////////////////////////////////
// CLz_TextDoc diagnostics
#ifdef _DEBUG
void CLz_TextDoc::AssertValid() const
{
CDocument::AssertValid();
}
void CLz_TextDoc::Dump(CDumpContext& dc) const
{
CDocument::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CLz_TextDoc commands
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -