【VC开源代码栏目提醒】:网学会员在VC开源代码频道为大家收集整理了CONTROLERDRAWVIEW.CPP提供大家参考,希望对大家有所帮助!
// ControlerDrawView.cpp : implementation of the CControlerDrawView class
//
#include "stdafx.h"
#include "ControlerDraw.h"
#include "ControlerDrawDoc.h"
#include "ControlerDrawView.h"
#include "DrawDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CControlerDrawView
IMPLEMENT_DYNCREATE(CControlerDrawView, CView)
BEGIN_MESSAGE_MAP(CControlerDrawView, CView)
//{{AFX_MSG_MAP(CControlerDrawView)
ON_COMMAND(ID_CONTROL, OnControl)
//}}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()
/////////////////////////////////////////////////////////////////////////////
// CControlerDrawView construction/destruction
CControlerDrawView::CControlerDrawView()
{
// TODO: add construction code here
}
CControlerDrawView::~CControlerDrawView()
{
}
BOOL CControlerDrawView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CControlerDrawView drawing
void CControlerDrawView::OnDraw(CDC* pDC)
{
CControlerDrawDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CControlerDrawView printing
BOOL CControlerDrawView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
void CControlerDrawView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add extra initialization before printing
}
void CControlerDrawView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
// TODO: add cleanup after printing
}
/////////////////////////////////////////////////////////////////////////////
// CControlerDrawView diagnostics
#ifdef _DEBUG
void CControlerDrawView::AssertValid() const
{
CView::AssertValid();
}
void CControlerDrawView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CControlerDrawDoc* CControlerDrawView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CControlerDrawDoc)));
return (CControlerDrawDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CControlerDrawView message handlers
void CControlerDrawView::OnControl()
{
// TODO: Add your command handler code here
CDrawDlg drawdlg ;
drawdlg.DoModal() ;
}
上一篇:
CONTROLERDRAWDOC.CPP
下一篇:
晚点遇见你,余生都是你