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

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
// AtlView3.h : Declaration of the CAtlView3

#pragma once
#include "resource.h"       // main symbols

#include "_IAtlView3Events_CP.h"
#include "MfcViewLib_i.h"


// CAtlView3
class CShareFormView3;
class ATL_NO_VTABLE CAtlView3 : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CAtlView3, &CLSID_AtlView3>,
	public IConnectionPointContainerImpl<CAtlView3>,
	public IProvideClassInfo2Impl<&CLSID_AtlView3, &__uuidof(_IAtlView3Events), &LIBID_MfcViewLibLib>,
	public CProxy_IAtlView3Events<CAtlView3>, 
	public IDispatchImpl<IAtlView3, &IID_IAtlView3, &LIBID_MfcViewLibLib, /*wMajor =*/ 1, /*wMinor =*/ 0>
{
public:
	CShareFormView3 *m_pMfcWnd;
	CAtlView3()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_ATLVIEW3)


BEGIN_COM_MAP(CAtlView3)
	COM_INTERFACE_ENTRY(IAtlView3)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(IProvideClassInfo)
	COM_INTERFACE_ENTRY(IProvideClassInfo2)
	COM_INTERFACE_ENTRY(IConnectionPointContainer)
END_COM_MAP()

BEGIN_CONNECTION_POINT_MAP(CAtlView3)
	CONNECTION_POINT_ENTRY(__uuidof(_IAtlView3Events))
END_CONNECTION_POINT_MAP()

	DECLARE_PROTECT_FINAL_CONSTRUCT()

	HRESULT FinalConstruct()
	{
		return S_OK;
	}
	
	void FinalRelease() 
	{
	}

public:
	STDMETHOD(get_Name)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Name)(/*[in]*/ BSTR newVal);

	STDMETHOD(GetText)(BSTR str);
};

OBJECT_ENTRY_AUTO(__uuidof(AtlView3), CAtlView3)

// CShareFormView3
//

/////////////////////////////////////////////////////////////////////////////
// CShareFormView3 window

class CShareFormView3 : public CFormView
{
// Construction
protected:

	CShareFormView3();
	DECLARE_DYNCREATE(CShareFormView3)

// Form Data
public:
	BOOL bHooked;
	//{{AFX_DATA(CShareFormView3)
	enum { IDD = IDD_CShareFormView3 };
	//}}AFX_DATA

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CShareFormView3)
	public:
	virtual void OnInitialUpdate();
	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
public:
	CTangramObject* m_pTangramObject;
	CTangramObj* m_pTangramObj;
	CComObject<CAtlView3> *m_pComObj;
protected:
	virtual ~CShareFormView3();

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
protected:
	//{{AFX_MSG(CShareFormView3)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButton1();
	CString m_strEdit;
};

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

//0

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 | Terms of Use | Mobile
Web02 | 2.8.1411023.1 | Last Updated 15 Dec 2002
Article Copyright 2002 by dean170
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid