www.pudn.com > 怎样把MID中的菜单去掉.rar > 22View.cpp
// 22View.cpp : implementation of the CMy22View class
//
#include "stdafx.h"
#include "22.h"
#include "22Doc.h"
#include "22View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMy22View
IMPLEMENT_DYNCREATE(CMy22View, CView)
BEGIN_MESSAGE_MAP(CMy22View, CView)
//{{AFX_MSG_MAP(CMy22View)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CMy22View construction/destruction
CMy22View::CMy22View()
{
// TODO: add construction code here
}
CMy22View::~CMy22View()
{
}
BOOL CMy22View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CMy22View drawing
void CMy22View::OnDraw(CDC* pDC)
{
CMy22Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CMy22View printing
BOOL CMy22View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CMy22View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CMy22View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CMy22View diagnostics
#ifdef _DEBUG
void CMy22View::AssertValid() const
{
CView::AssertValid();
}
void CMy22View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CMy22Doc* CMy22View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMy22Doc)));
return (CMy22Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CMy22View message handlers