You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.4 KiB
C++
62 lines
1.4 KiB
C++
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
//文件 OleObject.h
|
|
//主要功能:
|
|
//
|
|
//程序编写: 2005-12-07
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
#include ".\pointnamerect.h"
|
|
#include "afxole.h"
|
|
|
|
class COleObject;
|
|
|
|
class AFX_EXT_CLASS COleItem : public COleDocObjectItem
|
|
{
|
|
DECLARE_SERIAL(COleItem)
|
|
|
|
public:
|
|
COleItem(COleDocument* pContainerDoc = NULL, COleObject* pOleObject = NULL);
|
|
~COleItem();
|
|
|
|
virtual void Clear(void);
|
|
|
|
void SetOleObject(COleObject* pOleObject);
|
|
COleObject* GetOleObject(void);
|
|
|
|
protected:
|
|
COleObject* m_pOleObject;
|
|
};
|
|
|
|
class AFX_EXT_CLASS COleObject :
|
|
public CPointNameRect
|
|
{
|
|
public:
|
|
COleObject(void);
|
|
virtual ~COleObject(void);
|
|
|
|
protected:
|
|
COleItem* m_pOleItem;
|
|
|
|
public:
|
|
void SetOleItem(COleItem* pOleItem);
|
|
COleItem* GetOleItem(void);
|
|
|
|
void operator=(COleObject& pt);
|
|
|
|
void Serialize(CArchive& ar, const short &ver) override;
|
|
virtual int Read(CFile& fr, const short& ver);
|
|
virtual void Write(CFile& fw, const short& ver);
|
|
virtual void Clear(void);
|
|
virtual void Clone(void* pOleObject); //为COleObject对象或COleObjectEx对象
|
|
virtual int ReadDML(CFile &fw, const short &ver);
|
|
virtual int ReadPCG(CFile &fw, const short &ver);
|
|
|
|
//必须经过派生类对此函数重写
|
|
virtual COleItem* CloneOleItem(const COleItem* pItem);
|
|
};
|
|
|
|
typedef void (* PFUN_NEW_OLE)(COleItem** pItem, COleObject **pObject);
|
|
extern PFUN_NEW_OLE m_pFunGloblNewOle;
|