|
// DemoDoc.cpp : implementation of the CDemoDoc class
//
#include "stdafx.h"
#include "Demo.h"
#include "DemoDoc.h"
#include "CntrItem.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CDemoDoc
IMPLEMENT_DYNCREATE(CDemoDoc, CRichEditDoc)
BEGIN_MESSAGE_MAP(CDemoDoc, CRichEditDoc)
// 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()
// CDemoDoc construction/destruction
CDemoDoc::CDemoDoc()
{
// TODO: add one-time construction code here
}
CDemoDoc::~CDemoDoc()
{
}
BOOL CDemoDoc::OnNewDocument()
{
if (!CRichEditDoc::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
CRichEditCntrItem* CDemoDoc::CreateClientItem(REOBJECT* preo) const
{
return new CDemoCntrItem(preo, const_cast<CDemoDoc*>(this));
}
// CDemoDoc serialization
void CDemoDoc::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);
}
// CDemoDoc diagnostics
#ifdef _DEBUG
void CDemoDoc::AssertValid() const
{
CRichEditDoc::AssertValid();
}
void CDemoDoc::Dump(CDumpContext& dc) const
{
CRichEditDoc::Dump(dc);
}
#endif //_DEBUG
// CDemoDoc commands
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Jean-Michel LE FOL is a GraphTalk product architect.
GraphTalk is a set of products which cover the whole scope of the development process. GraphTalk is used by the main insurance compagnies over the world.
The development team is currently based in France near Paris.