1
// mfc1View.cpp : implementation of the Cmfc1View class
17
IMPLEMENT_DYNCREATE(Cmfc1View, CView)
19
BEGIN_MESSAGE_MAP(Cmfc1View, CView)
20
// Standard printing commands
21
ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
22
ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
23
ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
26
// Cmfc1View construction/destruction
28
Cmfc1View::Cmfc1View()
30
// TODO: add construction code here
34
Cmfc1View::~Cmfc1View()
38
BOOL Cmfc1View::PreCreateWindow(CREATESTRUCT& cs)
40
// TODO: Modify the Window class or styles here by modifying
41
// the CREATESTRUCT cs
43
return CView::PreCreateWindow(cs);
48
void Cmfc1View::OnDraw(CDC* /*pDC*/)
50
Cmfc1Doc* pDoc = GetDocument();
55
// TODO: add draw code for native data here
61
BOOL Cmfc1View::OnPreparePrinting(CPrintInfo* pInfo)
63
// default preparation
64
return DoPreparePrinting(pInfo);
67
void Cmfc1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
69
// TODO: add extra initialization before printing
72
void Cmfc1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
74
// TODO: add cleanup after printing
78
// Cmfc1View diagnostics
81
void Cmfc1View::AssertValid() const
86
void Cmfc1View::Dump(CDumpContext& dc) const
91
Cmfc1Doc* Cmfc1View::GetDocument() const // non-debug version is inline
93
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(Cmfc1Doc)));
94
return (Cmfc1Doc*)m_pDocument;
99
// Cmfc1View message handlers