home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / bindscrb / scribvw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.3 KB  |  75 lines

  1. // scribvw.h : interface of the CScribView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. class CScribView : public CScrollView
  14. {
  15. protected: // create from serialization only
  16.     CScribView();
  17.     DECLARE_DYNCREATE(CScribView)
  18.  
  19. // Attributes
  20. public:
  21.     CScribDoc* GetDocument();
  22.  
  23. protected:
  24.     CStroke*    m_pStrokeCur;   // the stroke in progress
  25.     CPoint      m_ptPrev;       // the last mouse pt in the stroke in progress
  26.  
  27. // Operations
  28. public:
  29.     void SetScrollInfo();       // resync scroll sizes
  30.  
  31. // Overrides
  32.     // ClassWizard generated virtual function overrides
  33.     //{{AFX_VIRTUAL(CScribView)
  34.     public:
  35.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  36.     virtual void OnInitialUpdate();
  37.     virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
  38.     protected:
  39.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  40.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  41.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  42.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  43.     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  44.     //}}AFX_VIRTUAL
  45.  
  46. // Implementation
  47. public:
  48.     void PrintTitlePage(CDC* pDC, CPrintInfo* pInfo);
  49.     void PrintPageHeader(CDC* pDC, CPrintInfo* pInfo, CString& strHeader);
  50.     virtual ~CScribView();
  51. #ifdef _DEBUG
  52.     virtual void AssertValid() const;
  53.     virtual void Dump(CDumpContext& dc) const;
  54. #endif
  55.  
  56. protected:
  57.  
  58. // Generated message map functions
  59. protected:
  60.     //{{AFX_MSG(CScribView)
  61.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  62.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  63.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  64.     afx_msg void OnSize(UINT nType, int cx, int cy);
  65.     //}}AFX_MSG
  66.     DECLARE_MESSAGE_MAP()
  67. };
  68.  
  69. #ifndef _DEBUG  // debug version in scribvw.cpp
  70. inline CScribDoc* CScribView::GetDocument()
  71.    { return (CScribDoc*) m_pDocument; }
  72. #endif
  73.  
  74. /////////////////////////////////////////////////////////////////////////////
  75.