Click here to Skip to main content
15,881,882 members
Articles / Desktop Programming / ATL

Create a Universal Document Template which supports Dynamic Frame Window Layout

Rate me:
Please Sign up or sign in to vote.
3.00/5 (8 votes)
14 Dec 20024 min read 49.2K   668   24  
Introduce a programming technology to design a very complex, rich document type.
//*************************************************************
// ��Ȩ������
// ---------------
// ���ļ���TangramDeveloper����ϵͳ��һ����
// ��Ȩ���� (C) 2000-2002 TangramDeveloper Team��
//
// δ����ɣ���ϵͳ��Դ���벻�����κη�ʽ�޸ġ����û򷢲�
//*************************************************************
#pragma once

// ObjExtManager.h : header file
//

#include "stdafx.h"

void InitLib();

void ConnectClsInfo();
class CTGObject;
class CTangramServerObj;
extern CTangramServerObj* g_pTangramServer;

/////////////////////////////////////////

class CTangramManager 
{
// Attributes
public:
	CTangramManager(CFrameWnd *pFrameWnd, CRuntimeClass* pFrameClass, CRuntimeClass* pDockBarClass = NULL, CString strServerID = _T("TangramAppServer.Documents"),IDispatch*pAppDisp=NULL,CRuntimeClass* pDesignClsInfo=NULL, BOOL bMDI=TRUE,BOOL bMDITab = FALSE);           
	virtual ~CTangramManager();
	CTangramServerObj* m_pTGObj;
// Operations
public:
	void AddMfcObject(CRuntimeClass* pMfcObjInfo, CRuntimeClass* pMfcConnectObjInfo=NULL, CString strHeader = _T(""));
};

class CTangramObj : public CObject  
{
public:
	CTangramObj();
	virtual ~CTangramObj();
	BOOL bHooked;
	CLSID m_ObjClsID;
	IDispatch* m_pDisp;
};

class CTangramObject : public CObject  
{
public:
	CTangramObject();
	virtual ~CTangramObject();
	//////////////////modify by sunhui///////
	BOOL bDefineRegist;
	BOOL isRegist ;
	IDispatch* m_pDisp;
	IDispatch* m_pApcDisp;
	CObArray m_DataObArray;
	BOOL m_bHooked;
	//////////////////modify by sunhui///////

	HRESULT getAPCName(BSTR* pVal);
	HRESULT putAPCName(BSTR newName);
};

class CTangramServerObj  
{
public:
	CTangramServerObj();
	virtual ~CTangramServerObj();
	///////////////Modify by sunhui///////////
	CTangramObject* m_pCurTangramObj;
	CTangramObj* m_pCurTangramObj2;
	CTangramManager* m_pObjExtManager;
	CString m_strCurExternCnn;
	//��ǰ���ⲿ�Ӵ���
	CMapStringToPtr m_ExternalCnnDictionary;
	CMapStringToPtr m_MfcObjInfoDictionary;
	CMapStringToPtr m_MfcConnectObjInfoDictionary;
	CMapStringToString m_MfcConnectExternalInfoDictionary;
	BOOL m_bHook;
	///////////////Modify by sunhui///////////
};

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
China China
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions