//
//  part_view.cpp - part view class implementation
//
//  $Id: part_view.cpp 47 2014-02-07 01:02:55Z brian $ 
//
//  Copyright (c) 1999-2014 by Precision Micro Control Corp. All rights reserved.
//
#include "stdafx.h"

IMPLEMENT_DYNCREATE(CPartView, CEditView)

BEGIN_MESSAGE_MAP(CPartView, CEditView)
	ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()

void CPartView::OnDraw(CDC* pDC)
{
	CPart* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
}

BOOL CPartView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default CEditView preparation
	return CEditView::OnPreparePrinting(pInfo);
}

void CPartView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView begin printing.
	CEditView::OnBeginPrinting(pDC, pInfo);
}

void CPartView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
	// Default CEditView end printing
	CEditView::OnEndPrinting(pDC, pInfo);
}

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