Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // MFCApplication1View.cpp : implementation of the CMFCApplication1View class
- //
- #include "stdafx.h"
- // SHARED_HANDLERS can be defined in an ATL project implementing preview, thumbnail
- // and search filter handlers and allows sharing of document code with that project.
- #ifndef SHARED_HANDLERS
- #include "MFCApplication1.h"
- #endif
- #include "MFCApplication1Doc.h"
- #include "MFCApplication1View.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #endif
- // CMFCApplication1View
- IMPLEMENT_DYNCREATE(CMFCApplication1View, CView)
- BEGIN_MESSAGE_MAP(CMFCApplication1View, CView)
- // 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()
- // CMFCApplication1View construction/destruction
- CMFCApplication1View::CMFCApplication1View()
- {
- // TODO: add construction code here
- }
- CMFCApplication1View::~CMFCApplication1View()
- {
- }
- BOOL CMFCApplication1View::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CView::PreCreateWindow(cs);
- }
- // CMFCApplication1View drawing
- void CMFCApplication1View::OnDraw(CDC* /*pDC*/)
- {
- CMFCApplication1Doc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- if (!pDoc)
- return;
- // TODO: add draw code for native data here
- }
- // CMFCApplication1View printing
- BOOL CMFCApplication1View::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CMFCApplication1View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CMFCApplication1View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- // CMFCApplication1View diagnostics
- #ifdef _DEBUG
- void CMFCApplication1View::AssertValid() const
- {
- CView::AssertValid();
- }
- void CMFCApplication1View::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- CMFCApplication1Doc* CMFCApplication1View::GetDocument() const // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMFCApplication1Doc)));
- return (CMFCApplication1Doc*)m_pDocument;
- }
- #endif //_DEBUG
- // CMFCApplication1View message handlers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement