www.pudn.com > CLanCompiler.rar > CLanCompilerView.cpp
// CLanCompilerView.cpp : implementation of the CCLanCompilerView class
//
#include "stdafx.h"
#include "CLanCompiler.h"
#include "CLanCompilerDoc.h"
#include "CLanCompilerView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerView
IMPLEMENT_DYNCREATE(CCLanCompilerView, CEditView)
BEGIN_MESSAGE_MAP(CCLanCompilerView, CEditView)
//{{AFX_MSG_MAP(CCLanCompilerView)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CEditView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerView construction/destruction
CCLanCompilerView::CCLanCompilerView()
{
// TODO: add construction code here
}
CCLanCompilerView::~CCLanCompilerView()
{
}
BOOL CCLanCompilerView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
BOOL bPreCreated = CEditView::PreCreateWindow(cs);
cs.style &= ~(ES_AUTOHSCROLL|WS_HSCROLL); // Enable word-wrapping
return bPreCreated;
}
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerView drawing
void CCLanCompilerView::OnDraw(CDC* pDC)
{
CCLanCompilerDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerView printing
BOOL CCLanCompilerView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default CEditView preparation
return CEditView::OnPreparePrinting(pInfo);
}
void CCLanCompilerView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo)
{
// Default CEditView begin printing.
CEditView::OnBeginPrinting(pDC, pInfo);
}
void CCLanCompilerView::OnEndPrinting(CDC* pDC, CPrintInfo* pInfo)
{
// Default CEditView end printing
CEditView::OnEndPrinting(pDC, pInfo);
}
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerView diagnostics
#ifdef _DEBUG
void CCLanCompilerView::AssertValid() const
{
CEditView::AssertValid();
}
void CCLanCompilerView::Dump(CDumpContext& dc) const
{
CEditView::Dump(dc);
}
CCLanCompilerDoc* CCLanCompilerView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCLanCompilerDoc)));
return (CCLanCompilerDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CCLanCompilerView message handlers
void CCLanCompilerView::DoDataExchange(CDataExchange* pDX)
{
// TODO: Add your specialized code here and/or call the base class
CEditView::DoDataExchange(pDX);
}