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