【VC开源代码栏目提醒】:网学会员--在 VC开源代码编辑为广大网友搜集整理了:Ex06_3View.cpp绩等信息,祝愿广大网友取得需要的信息,参考学习。
// Ex06_3View.cpp : implementation of the CEx06_3View class
//
#include "stdafx.h"
#include "Ex06_3.h"
#include "Ex06_3Doc.h"
#include "Ex06_3View.h"
#include "CalDlg.h"//包含对话框头文件
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEx06_3View
IMPLEMENT_DYNCREATE(CEx06_3View, CView)
BEGIN_MESSAGE_MAP(CEx06_3View, CView)
//{{AFX_MSG_MAP(CEx06_3View)
ON_COMMAND(ID_DIALOG_CAL, OnDialogCal)
//}}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_3View construction/destruction
CEx06_3View::CEx06_3View()
{
// TODO: add construction code here
}
CEx06_3View::~CEx06_3View()
{
}
BOOL CEx06_3View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_3View drawing
void CEx06_3View::OnDraw(CDC* pDC)
{
CEx06_3Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_3View printing
BOOL CEx06_3View::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CEx06_3View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CEx06_3View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CEx06_3View diagnostics
#ifdef _DEBUG
void CEx06_3View::AssertValid() const
{
CView::AssertValid();
}
void CEx06_3View::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CEx06_3Doc* CEx06_3View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CEx06_3Doc)));
return (CEx06_3Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEx06_3View message handlers
void CEx06_3View::OnDialogCal()
{
// TODO: Add your command handler code here
CCalDlg dlg;
dlg.DoModal();//模式调用四则运算对话框
}