home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
WTJ9403.ZIP
/
OTEXT
/
OTEXT.ARJ
/
OTEXTDOC.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-01
|
3KB
|
100 lines
// otextdoc.cpp : implementation of the COTextDoc class
//
#include "stdafx.h"
#include "otext.h"
#include "otextdoc.h"
#include "srvritem.h"
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COTextDoc
IMPLEMENT_DYNCREATE(COTextDoc, COleServerDoc)
BEGIN_MESSAGE_MAP(COTextDoc, COleServerDoc)
//{{AFX_MSG_MAP(COTextDoc)
// 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()
BEGIN_DISPATCH_MAP(COTextDoc, COleServerDoc)
//{{AFX_DISPATCH_MAP(COTextDoc)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_DISPATCH_MAP
END_DISPATCH_MAP()
/////////////////////////////////////////////////////////////////////////////
// COTextDoc construction/destruction
COTextDoc::COTextDoc()
{
EnableAutomation();
// TODO: add one-time construction code here
AfxOleLockApp();
}
COTextDoc::~COTextDoc()
{
AfxOleUnlockApp();
}
BOOL COTextDoc::OnNewDocument()
{
if (!COleServerDoc::OnNewDocument())
return FALSE;
// TODO: add reinitialization code here
// (SDI documents will reuse this document)
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// COTextDoc server implementation
COleServerItem* COTextDoc::OnGetEmbeddedItem()
{
// OnGetEmbeddedItem is called by the framework to get the COleServerItem
// that is associated with the document. It is only called when necessary.
COTextSrvrItem* pItem = new COTextSrvrItem(this);
ASSERT_VALID(pItem);
return pItem;
}
/////////////////////////////////////////////////////////////////////////////
// COTextDoc serialization
void COTextDoc::Serialize(CArchive& ar)
{
((CEditView *)m_viewList.GetHead())->SerializeRaw(ar);
}
/////////////////////////////////////////////////////////////////////////////
// COTextDoc diagnostics
#ifdef _DEBUG
void COTextDoc::AssertValid() const
{
COleServerDoc::AssertValid();
}
void COTextDoc::Dump(CDumpContext& dc) const
{
COleServerDoc::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// COTextDoc commands