www.pudn.com > PL0_compiler.rar > BottomView.cpp
// BottomView.cpp : implementation file
//
#include "stdafx.h"
#include "PL0.h"
#include "PL0Doc.h"
#include "BottomView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CBottomView
IMPLEMENT_DYNCREATE(CBottomView, CRichEditView)
CBottomView::CBottomView()
{
}
CBottomView::~CBottomView()
{
}
BEGIN_MESSAGE_MAP(CBottomView, CRichEditView)
//{{AFX_MSG_MAP(CBottomView)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CBottomView drawing
void CBottomView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
CPL0Doc* CBottomView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CPL0Doc)));
return (CPL0Doc*)m_pDocument;
}
/////////////////////////////////////////////////////////////////////////////
// CBottomView diagnostics
#ifdef _DEBUG
void CBottomView::AssertValid() const
{
CRichEditView::AssertValid();
}
void CBottomView::Dump(CDumpContext& dc) const
{
CRichEditView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CBottomView message handlers
void CBottomView::OnInitialUpdate()
{
CRichEditView::OnInitialUpdate();
// TODO: Add your specialized code here and/or call the base class
// Set the printing margins (720 twips = 1/2 inch).
SetMargins(CRect(720, 720, 720, 720));
GetRichEditCtrl().ReplaceSel("此处为错误列表...\n");
}
int CBottomView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CRichEditView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
CPL0Doc* pDoc = GetDocument();
pDoc->m_wndBottomView = this;
return 0;
}