www.pudn.com > SCIDE.rar > SCView.cpp
// SCView.cpp : implementation of the CSCView class
//
#include "stdafx.h"
#include "SCIDE.h"
#include "SCDoc.h"
#include "SCView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSCView
IMPLEMENT_DYNCREATE(CSCView, CCrystalEditView)
BEGIN_MESSAGE_MAP(CSCView, CCrystalEditView)
//{{AFX_MSG_MAP(CSCView)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CCrystalEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_DIRECT, CCrystalEditView::OnFilePrint)
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CCrystalEditView::OnFilePrintPreview)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSCView construction/destruction
CSCView::CSCView()
{
// TODO: add construction code here
}
CSCView::~CSCView()
{
}
BOOL CSCView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CCrystalEditView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CSCView printing
BOOL CSCView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CSCView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CSCView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CSCView diagnostics
#ifdef _DEBUG
void CSCView::AssertValid() const
{
CCrystalEditView::AssertValid();
}
void CSCView::Dump(CDumpContext& dc) const
{
CCrystalEditView::Dump(dc);
}
CSCDoc* CSCView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CSCDoc)));
return (CSCDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CSCView message handlers
CCrystalTextBuffer *CSCView::LocateTextBuffer()
{
return &GetDocument()->m_xTextBuffer;
}
void CSCView::OnInitialUpdate()
{
CCrystalEditView::OnInitialUpdate();
SetFont(GetDocument()->m_lf);
CMDIChildWnd *pWnd=(CMDIChildWnd *)GetParentFrame();
pWnd->MDIMaximize();
}