// EmbeddableAppView.cpp : implementation of the CEmbeddableAppView class
//

#include "stdafx.h"
#include "EmbeddableApp.h"

#include "EmbeddableAppDoc.h"
#include "EmbeddableAppView.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CEmbeddableAppView

IMPLEMENT_DYNCREATE(CEmbeddableAppView, CView)

BEGIN_MESSAGE_MAP(CEmbeddableAppView, CView)
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CView::OnFilePrintPreview)
END_MESSAGE_MAP()

// CEmbeddableAppView construction/destruction

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

}

CEmbeddableAppView::~CEmbeddableAppView()
{
}

BOOL CEmbeddableAppView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

// CEmbeddableAppView drawing

void CEmbeddableAppView::OnDraw(CDC* /*pDC*/)
{
	CEmbeddableAppDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	if (!pDoc)
		return;

	// TODO: add draw code for native data here
}


// CEmbeddableAppView printing

BOOL CEmbeddableAppView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CEmbeddableAppView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CEmbeddableAppView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}


// CEmbeddableAppView diagnostics

#ifdef _DEBUG
void CEmbeddableAppView::AssertValid() const
{
	CView::AssertValid();
}

void CEmbeddableAppView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

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


// CEmbeddableAppView message handlers
