Визуальное программирование и MFC

       

MultiView.cpp


// multiView.cpp : implementation of the CMultiView class //

#include "stdafx.h" #include "multi.h"

#include "multiDoc.h" #include "multiView.h"

#ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif

///////////////////////////////////////////////////////////////////////////// // CMultiView

IMPLEMENT_DYNCREATE(CMultiView, CView)

BEGIN_MESSAGE_MAP(CMultiView, CView) //{{AFX_MSG_MAP(CMultiView) // 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, CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) END_MESSAGE_MAP()

///////////////////////////////////////////////////////////////////////////// // CMultiView construction/destruction

CMultiView::CMultiView() { // TODO: add construction code here

}

CMultiView::~CMultiView() { }

BOOL CMultiView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs

return CView::PreCreateWindow(cs); }

///////////////////////////////////////////////////////////////////////////// // CMultiView drawing

void CMultiView::OnDraw(CDC* pDC) { CMultiDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc);

// TODO: add draw code for native data here }

///////////////////////////////////////////////////////////////////////////// // CMultiView printing

BOOL CMultiView::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); }

void CMultiView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing }

void CMultiView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing }

///////////////////////////////////////////////////////////////////////////// // CMultiView diagnostics

#ifdef _DEBUG void CMultiView::AssertValid() const { CView::AssertValid(); }

void CMultiView::Dump(CDumpContext& dc) const { CView::Dump(dc); }

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

///////////////////////////////////////////////////////////////////////////// // CMultiView message handlers



Содержание раздела