test1_mfcView.cpp
资源名称:test1_mfc.rar [点击查看]
上传用户:yongwangda
上传日期:2022-08-10
资源大小:2891k
文件大小:3k
源码类别:
图片显示
开发平台:
Visual C++
- // test1_mfcView.cpp : implementation of the CTest1_mfcView class
- //
- #include "stdafx.h"
- #include "test1_mfc.h"
- #include "test1_mfcDoc.h"
- #include "test1_mfcView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CTest1_mfcView
- IMPLEMENT_DYNCREATE(CTest1_mfcView, CView)
- BEGIN_MESSAGE_MAP(CTest1_mfcView, CView)
- //{{AFX_MSG_MAP(CTest1_mfcView)
- // 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()
- /////////////////////////////////////////////////////////////////////////////
- // CTest1_mfcView construction/destruction
- CTest1_mfcView::CTest1_mfcView()
- {
- // TODO: add construction code here
- }
- CTest1_mfcView::~CTest1_mfcView()
- {
- }
- BOOL CTest1_mfcView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CView::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CTest1_mfcView drawing
- void CTest1_mfcView::OnDraw(CDC* pDC)
- {
- CTest1_mfcDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CTest1_mfcView printing
- BOOL CTest1_mfcView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CTest1_mfcView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CTest1_mfcView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- /////////////////////////////////////////////////////////////////////////////
- // CTest1_mfcView diagnostics
- #ifdef _DEBUG
- void CTest1_mfcView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CTest1_mfcView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- CTest1_mfcDoc* CTest1_mfcView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CTest1_mfcDoc)));
- return (CTest1_mfcDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CTest1_mfcView message handlers