Beruflich Dokumente
Kultur Dokumente
#if !
defined(AFX_EXP3AVIEW_H__30255CA8_0BBE_4EE5_A61D_D0484601CB5
1__INCLUDED_)
#define
AFX_EXP3AVIEW_H__30255CA8_0BBE_4EE5_A61D_D0484601CB51__INC
LUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CExp3aView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CExp3aView)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !
defined(AFX_EXP3AVIEW_H__30255CA8_0BBE_4EE5_A61D_D0484601CB5
1__INCLUDED_)
// exp3aView.cpp : implementation of the CExp3aView class
#include "stdafx.h"
#include "exp3a.h"
#include "exp3aDoc.h"
#include "exp3aView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// CExp3aView
IMPLEMENT_DYNCREATE(CExp3aView, CView)
BEGIN_MESSAGE_MAP(CExp3aView, CView)
//{{AFX_MSG_MAP(CExp3aView)
ON_WM_LBUTTONDOWN()
//}}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()
// CExp3aView construction/destruction
CExp3aView::CExp3aView():m_rectEllipse(100,100,200,200)
{
m_ncolor=GRAY_BRUSH;
}
return CView::PreCreateWindow(cs);
}
// CExp3aView drawing
void CExp3aView::OnDraw(CDC* pDC)
{
CExp3aDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
pDC->SelectStockObject(m_ncolor);
pDC->Ellipse(m_rectEllipse);
}
// CExp3aView printing
BOOL CExp3aView::OnPreparePrinting(CPrintInfo* pInfo)
{
// default preparation
return DoPreparePrinting(pInfo);
}
// CExp3aView diagnostics
#ifdef _DEBUG
void CExp3aView::AssertValid() const
{
CView::AssertValid();
}
void CExp3aView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CExp3aDoc* CExp3aView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CExp3aDoc)));
return (CExp3aDoc*)m_pDocument;
}
#endif //_DEBUG
OUTPUT