C_EditorDoc.cpp
资源名称:ceditor.rar [点击查看]
上传用户:hgtech
上传日期:2022-06-07
资源大小:4455k
文件大小:2k
源码类别:
词法分析
开发平台:
Visual C++
- // C_EditorDoc.cpp : implementation of the CC_EditorDoc class
- //
- #include "stdafx.h"
- #include "C_Editor.h"
- #include "C_EditorDoc.h"
- #include "CntrItem.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CC_EditorDoc
- IMPLEMENT_DYNCREATE(CC_EditorDoc, CRichEditDoc)
- BEGIN_MESSAGE_MAP(CC_EditorDoc, CRichEditDoc)
- //{{AFX_MSG_MAP(CC_EditorDoc)
- // 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
- // Enable default OLE container implementation
- ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, CRichEditDoc::OnUpdateEditLinksMenu)
- ON_COMMAND(ID_OLE_EDIT_LINKS, CRichEditDoc::OnEditLinks)
- ON_UPDATE_COMMAND_UI_RANGE(ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, CRichEditDoc::OnUpdateObjectVerbMenu)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CC_EditorDoc construction/destruction
- CC_EditorDoc::CC_EditorDoc()
- {
- // TODO: add one-time construction code here
- }
- CC_EditorDoc::~CC_EditorDoc()
- {
- }
- BOOL CC_EditorDoc::OnNewDocument()
- {
- if (!CRichEditDoc::OnNewDocument())
- return FALSE;
- // TODO: add reinitialization code here
- // (SDI documents will reuse this document)
- return TRUE;
- }
- CRichEditCntrItem* CC_EditorDoc::CreateClientItem(REOBJECT* preo) const
- {
- // cast away constness of this
- return new CC_EditorCntrItem(preo, (CC_EditorDoc*) this);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CC_EditorDoc serialization
- void CC_EditorDoc::Serialize(CArchive& ar)
- {
- if (ar.IsStoring())
- {
- // TODO: add storing code here
- }
- else
- {
- // TODO: add loading code here
- }
- // Calling the base class CRichEditDoc enables serialization
- // of the container document's COleClientItem objects.
- // TODO: set CRichEditDoc::m_bRTF = FALSE if you are serializing as text
- CRichEditDoc::Serialize(ar);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CC_EditorDoc diagnostics
- #ifdef _DEBUG
- void CC_EditorDoc::AssertValid() const
- {
- CRichEditDoc::AssertValid();
- }
- void CC_EditorDoc::Dump(CDumpContext& dc) const
- {
- CRichEditDoc::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CC_EditorDoc commands