- // BilliardsView.cpp : implementation of the CBilliardsView class
- //
- #include "stdafx.h"
- #include "Billiards.h"
- #include "BilliardsDoc.h"
- #include "BilliardsView.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CBilliardsView
- IMPLEMENT_DYNCREATE(CBilliardsView, CView)
- BEGIN_MESSAGE_MAP(CBilliardsView, CView)
- //{{AFX_MSG_MAP(CBilliardsView)
- // 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()
- /////////////////////////////////////////////////////////////////////////////
- // CBilliardsView construction/destruction
- CBilliardsView::CBilliardsView()
- {
- // TODO: add construction code here
- }
- CBilliardsView::~CBilliardsView()
- {
- }
- BOOL CBilliardsView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CView::PreCreateWindow(cs);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CBilliardsView drawing
- void CBilliardsView::OnDraw(CDC* pDC)
- {
- CBilliardsDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
- // TODO: add draw code for native data here
- }
- /////////////////////////////////////////////////////////////////////////////
- // CBilliardsView printing
- BOOL CBilliardsView::OnPreparePrinting(CPrintInfo* pInfo)
- {
- // default preparation
- return DoPreparePrinting(pInfo);
- }
- void CBilliardsView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add extra initialization before printing
- }
- void CBilliardsView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
- {
- // TODO: add cleanup after printing
- }
- /////////////////////////////////////////////////////////////////////////////
- // CBilliardsView diagnostics
- #ifdef _DEBUG
- void CBilliardsView::AssertValid() const
- {
- CView::AssertValid();
- }
- void CBilliardsView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
- CBilliardsDoc* CBilliardsView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBilliardsDoc)));
- return (CBilliardsDoc*)m_pDocument;
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CBilliardsView message handlers