Click here to Skip to main content
15,879,239 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.
// VisualFrameWorkView.cpp : implementation of the CVisualFrameWorkView class
//

#include "stdafx.h"
#include "VisualFrameWork.h"
#include "mainfrm.h"

#include "VisualFrameWorkDoc.h"
#include "VisualFrameWorkView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CVisualFrameWorkView

IMPLEMENT_DYNCREATE(CVisualFrameWorkView, CTangramDesignView)

BEGIN_MESSAGE_MAP(CVisualFrameWorkView, CTangramDesignView)
	// Standard printing commands
END_MESSAGE_MAP()

// CVisualFrameWorkView construction/destruction

CVisualFrameWorkView::CVisualFrameWorkView()
{
	// TODO: add construction code here

}

CVisualFrameWorkView::~CVisualFrameWorkView()
{
}

// CVisualFrameWorkView drawing

void CVisualFrameWorkView::OnDraw(CDC* /*pDC*/)
{
	CVisualFrameWorkDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);

	// TODO: add draw code for native data here
}
///////////////$tangramapp$/////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
void CVisualFrameWorkView::SetDesignerPage()
{
	CWnd* pParent = &((CMainFrame*)theApp.m_pMainWnd)->m_wndSystemBar;
	if(pParent->IsChild(this))
		LoadFromResource(IDR_HTMLControlBar);
	else 
		LoadFromResource(IDR_DesignHTML);
}
///////////////$tangramapp end$/////////////////////////////////////////////////

// CVisualFrameWorkView diagnostics

#ifdef _DEBUG
void CVisualFrameWorkView::AssertValid() const
{
	CTangramDesignView::AssertValid();
}

void CVisualFrameWorkView::Dump(CDumpContext& dc) const
{
	CTangramDesignView::Dump(dc);
}

CVisualFrameWorkDoc* CVisualFrameWorkView::GetDocument() const // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CVisualFrameWorkDoc)));
	return (CVisualFrameWorkDoc*)m_pDocument;
}
#endif //_DEBUG


// CVisualFrameWorkView message handlers

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