【VC开源代码栏目提醒】:网学会员鉴于大家对VC开源代码十分关注,论文会员在此为大家搜集整理了“Ex06_7View.cpp”一文,供大家参考学习
// Ex06_7View.cpp : implementation of the CEx06_7View class
//
#include "stdafx.h"
#include "Ex06_7.h"
#include "Ex06_7Doc.h"
#include "Ex06_7View.h"
#include "PageDlgSheet.h"
#include "PageDlgWizard.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEx06_7View
IMPLEMENT_DYNCREATE(CEx06_7View, CView)
BEGIN_MESSAGE_MAP(CEx06_7View, CView)
//{{AFX_MSG_MAP(CEx06_7View)
ON_COMMAND(ID_VIEW_PROPERTYSHEET, OnViewPropertysheet)
ON_COMMAND(ID_VIEW_WIZARD, OnViewWizard)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CEx06_7View construction/destruction
CEx06_7View::CEx06_7View()
{
// TODO: add construction code here
m_Time="0:0:0";
}
CEx06_7View::~CEx06_7View()
{
}
BOOL CEx06_7View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_7View drawing
void CEx06_7View::OnDraw(CDC* pDC)
{
CEx06_7Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_7View printing
BOOL CEx06_7View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CEx06_7View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CEx06_7View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_7View diagnostics
#ifdef _DEBUG
void CEx06_7View::AssertValid() const
{
CView::AssertValid();
}
void CEx06_7View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CEx06_7Doc* CEx06_7View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CEx06_7Doc)));
return (CEx06_7Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEx06_7View message handlers
void CEx06_7View::OnViewPropertysheet()//显示属性单
{
// TODO: Add your command handler code here
CPageDlgSheet dlgsheet("属性单",this,0);//
dlgsheet.DoModal();
}
void CEx06_7View::OnViewWizard()
{
// TODO: Add your command handler code here
CPageDlgWizard dlgWizard("向导",this,0);//显示向导
dlgWizard.DoModal();
}