⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 axdocsvrdoc.cpp

📁 vc++ acticex原代码
💻 CPP
字号:
// AxDocSvrDoc.cpp : implementation of the CAxDocSvrDoc class
//

#include "stdafx.h"
#include "AxDocSvr.h"

#include "AxDocSvrDoc.h"
#include "CntrItem.h"
#include "SrvrItem.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAxDocSvrDoc

IMPLEMENT_DYNCREATE(CAxDocSvrDoc, CRichEditDoc)

BEGIN_MESSAGE_MAP(CAxDocSvrDoc, CRichEditDoc)
	//{{AFX_MSG_MAP(CAxDocSvrDoc)
		// 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()

/////////////////////////////////////////////////////////////////////////////
// CAxDocSvrDoc construction/destruction

CAxDocSvrDoc::CAxDocSvrDoc()
{
	// Use OLE compound files
	EnableCompoundFile();

	// TODO: add one-time construction code here

}

CAxDocSvrDoc::~CAxDocSvrDoc()
{
}

BOOL CAxDocSvrDoc::OnNewDocument()
{
	if (!CRichEditDoc::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}

CRichEditCntrItem* CAxDocSvrDoc::CreateClientItem(REOBJECT* preo) const
{
	// cast away constness of this
	return new CAxDocSvrCntrItem(preo, (CAxDocSvrDoc*) this);
}

/////////////////////////////////////////////////////////////////////////////
// CAxDocSvrDoc server implementation

COleServerItem* CAxDocSvrDoc::OnGetEmbeddedItem()
{
	// OnGetEmbeddedItem is called by the framework to get the COleServerItem
	//  that is associated with the document.  It is only called when necessary.

	CAxDocSvrSrvrItem* pItem = new CAxDocSvrSrvrItem(this);
	ASSERT_VALID(pItem);
	return pItem;
}

/////////////////////////////////////////////////////////////////////////////
// CAxDocSvrDoc Active Document server implementation

CDocObjectServer *CAxDocSvrDoc::GetDocObjectServer(LPOLEDOCUMENTSITE pDocSite)
{
	return new CDocObjectServer(this, pDocSite);
}



/////////////////////////////////////////////////////////////////////////////
// CAxDocSvrDoc serialization

void CAxDocSvrDoc::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);
}

/////////////////////////////////////////////////////////////////////////////
// CAxDocSvrDoc diagnostics

#ifdef _DEBUG
void CAxDocSvrDoc::AssertValid() const
{
	CRichEditDoc::AssertValid();
}

void CAxDocSvrDoc::Dump(CDumpContext& dc) const
{
	CRichEditDoc::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CAxDocSvrDoc commands

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -