【VC开源代码栏目提醒】:以下是网学会员为您推荐的VC开源代码-CMenu_2View.cpp,希望本篇文章对您学习有所帮助。
// CMenu_2View.cpp : implementation of the CCMenu_2View class
//
#include "stdafx.h"
#include "CMenu_2.h"
#include "CMenu_2Doc.h"
#include "CMenu_2View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCMenu_2View
IMPLEMENT_DYNCREATE(CCMenu_2View, CView)
BEGIN_MESSAGE_MAP(CCMenu_2View, CView)
//{{AFX_MSG_MAP(CCMenu_2View)
// 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()
/////////////////////////////////////////////////////////////////////////////
// CCMenu_2View construction/destruction
CCMenu_2View::CCMenu_2View()
{
// TODO: add construction code here
}
CCMenu_2View::~CCMenu_2View()
{
}
BOOL CCMenu_2View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CCMenu_2View drawing
void CCMenu_2View::OnDraw(CDC* pDC)
{
CCMenu_2Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CCMenu_2View printing
BOOL CCMenu_2View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CCMenu_2View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CCMenu_2View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CCMenu_2View diagnostics
#ifdef _DEBUG
void CCMenu_2View::AssertValid() const
{
CView::AssertValid();
}
void CCMenu_2View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CCMenu_2Doc* CCMenu_2View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCMenu_2Doc)));
return (CCMenu_2Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CCMenu_2View message handlers
上一篇:
CMenu_2Doc.cpp
下一篇:
科研管理杂志简介