Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version
Go to top

Create a Universal Document Template which supports Dynamic Frame Window Layout

, 14 Dec 2002
Introduce a programming technology to design a very complex, rich document type.
visualframework_src.zip
sample
ObjManager
res
ObjManager.manifest
VisualFrameWork
application.rgs
AtlForm.rgs
Board.rgs
DocumentCtrl.rgs
Documents.rgs
menuimg.bmp
Prairie Wind.bmp
res
Toolbar.bmp
VisualFrameWork.ico
VisualFrameWork.manifest
VisualFrameWorkDoc.ico
VisualFrameWork.rgs
VisualFrameWork.tlb
VisualFrameWork1
VisualFrameWork12
VisualFrameWork13
Demo1
Demo2
MfcViewLib
MfcViewLib.rgs
cnn.rgs
MfcViewLib.def
MfcViewLibps.def
AtlView2.rgs
AtlView3.rgs
vc70.tlb
VbComLib
VbComLib.vbproj.user
VCSharpComLib
VCSharpComLib.csproj.user
DemoDoc
Demo1
Demo2
Demo3
DocumentPropertyPage.rgs
New Document 2
New Document333
New Document 2dd
VBDoc
UD.dob
prjVBDoc.vbp
MSSCCPRJ.SCC
prjVBDoc.vbw
CNN
MSSCCPRJ.SCC
PrjCnn.vbw
PrjCnn.dll
PrjCnn.lib
PrjCnn.exp
cls.cls
PrjCnn.vbp
//*******************************************************************************
// COPYRIGHT NOTES
// ---------------
// This source code is a part of Tangram library.
// You may use, compile or redistribute it as part of your application 
// for free. You cannot redistribute it as a part of a software development 
// library without the agreement of the author. If the sources are 
// distributed along with the application, you should leave the original 
// copyright notes in the source code without any changes.
// This code can be used WITHOUT ANY WARRANTIES on your own risk.
// 
// For the latest updates to this library, check site:
// http://www.tangramdev.com
// 
// sunhui
//*******************************************************************************
// TangramObject.h: interface for the CTangramObject class.
//
//////////////////////////////////////////////////////////////////////

#include "afx.h"

#pragma once
class CConnectObj;
class CDocCntrItem;
class CTangramCntrItem;

class CTangramObj : public CObject  
{
	DECLARE_SERIAL(CTangramObj)
public:
	CTangramObj();
	virtual ~CTangramObj();

	////////////////modify by sunhui////////
	BOOL bHooked;
	CLSID m_ObjClsID;
	IDispatch* m_pDisp;
	////////////////modify by sunhui////////
};

class CTangramObject : public CObject  
{
public:
	//////////////////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);

	DECLARE_SERIAL(CTangramObject)

	void AttachDocCntrItem();
	void DeleteChild();
	void Create();
	CTangramObject();
	virtual ~CTangramObject();


	CObArray m_ObArray;
	TangramContainerType m_ContainerType;
	TangramObjType m_TangramObjType;
	CString m_strObjID;				  // ActiveObject CLSID
	CString m_strExternalObjID;		  // External ActiveObject CLSID
	CString m_strExternalCnn;		  // External ActiveObject CLSID
	CString m_strName;
	CString m_strObjName;

	CTangramObject* m_pParentObject;

	int m_nRowIndex;						// Splitter view: row index
	int m_nColIndex;						// Splitter view: column index
	int m_nRows;							// Splitters: number of rows
	int m_nCols;							// Splitters: number of columns
	CSize m_Size;							// Splitter: initial size
	CSize m_SizeMin;							// Splitter: initial size
	CString m_strTitle;						// Title of this window
	UINT uiImageId;

	CArray<CTangramObject*, CTangramObject*&> m_ChildObjectMap;
	CWnd *m_pWnd;                     // Window associated with this object
	CObject *m_pMfcObj;                     // Window associated with this object
	CConnectObj *m_pConObj;
	CRuntimeClass *m_pRuntimeClass;			// Class of this window
	CDocCntrItem* m_pDocCntrItem;
	CTangramCntrItem* m_pObjCntrItem;
	HWND hComWnd;

	BOOL isDocking;
	BOOL InnerDoc;

	virtual void Serialize(CArchive& ar);
};

class CTangramDockingObjImpl : public CObject
{
	DECLARE_DYNCREATE(CTangramDockingObjImpl);
public:
	CTangramDockingObjImpl(void);
	virtual ~CTangramDockingObjImpl(void);

	CTangramObject* m_pTangramObject;
	CFrameWnd* m_pDockingFrame;
	CControlBar* m_pDockingWnd;
	CWnd* m_pWnd;
	HWND m_hWnd;

	virtual CFrameWnd* CreateDockingFrame(CString strTitle,CFrameWnd* pParentFrame);
	virtual void SetTangramObj(CTangramObject* pObj = NULL);
};

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

Share

About the Author

dean170
Web Developer
China China
No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140922.1 | Last Updated 15 Dec 2002
Article Copyright 2002 by dean170
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid