// myex34cDoc.cpp : implementation of the CMyex34cDoc class
//

#include "stdafx.h"
#include "myex34c.h"

#include "myex34cDoc.h"
#include "CntrItem.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CMyex34cDoc

IMPLEMENT_DYNCREATE(CMyex34cDoc, CRichEditDoc)

BEGIN_MESSAGE_MAP(CMyex34cDoc, CRichEditDoc)
	//{{AFX_MSG_MAP(CMyex34cDoc)
		// 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(ID_OLE_VERB_FIRST, CRichEditDoc::OnUpdateObjectVerbMenu)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMyex34cDoc construction/destruction

CMyex34cDoc::CMyex34cDoc()
{
	// TODO: add one-time construction code here

}

CMyex34cDoc::~CMyex34cDoc()
{
}

BOOL CMyex34cDoc::OnNewDocument()
{
	if (!CRichEditDoc::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}

CRichEditCntrItem* CMyex34cDoc::CreateClientItem(REOBJECT* preo) const
{
	// cast away constness of this
	return new CMyex34cCntrItem(preo, (CMyex34cDoc*) this);
}



/////////////////////////////////////////////////////////////////////////////
// CMyex34cDoc serialization

void CMyex34cDoc::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);
}

/////////////////////////////////////////////////////////////////////////////
// CMyex34cDoc diagnostics

#ifdef _DEBUG
void CMyex34cDoc::AssertValid() const
{
	CRichEditDoc::AssertValid();
}

void CMyex34cDoc::Dump(CDumpContext& dc) const
{
	CRichEditDoc::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CMyex34cDoc commands

BOOL CMyex34cDoc::SaveModified() 
{
	// TODO: Add your specialized code here and/or call the base class
	return TRUE;
}

