home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c07 / scroll / scroview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.3 KB  |  53 lines

  1. // ScrollView.h : interface of the CMyScrollView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CMyScrollView : public CScrollView
  6. {
  7. protected: // create from serialization only
  8.     CMyScrollView();
  9.     DECLARE_DYNCREATE(CMyScrollView)
  10.  
  11. // Attributes
  12. public:
  13.     CScrollDoc* GetDocument();
  14.  
  15.  
  16. // Operations
  17. public:
  18.  
  19. // Overrides
  20.     // ClassWizard generated virtual function overrides
  21.     //{{AFX_VIRTUAL(CMyScrollView)
  22.     public:
  23.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  24.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  25.     protected:
  26.     virtual void OnInitialUpdate(); // called first time after construct
  27.     //}}AFX_VIRTUAL
  28.  
  29. // Implementation
  30. public:
  31.     virtual ~CMyScrollView();
  32. #ifdef _DEBUG
  33.     virtual void AssertValid() const;
  34.     virtual void Dump(CDumpContext& dc) const;
  35. #endif
  36.  
  37. protected:
  38.  
  39. // Generated message map functions
  40. protected:
  41.     //{{AFX_MSG(CMyScrollView)
  42.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  43.     //}}AFX_MSG
  44.     DECLARE_MESSAGE_MAP()
  45. };
  46.  
  47. #ifndef _DEBUG  // debug version in ScrollView.cpp
  48. inline CScrollDoc* CMyScrollView::GetDocument()
  49.    { return (CScrollDoc*)m_pDocument; }
  50. #endif
  51.  
  52. /////////////////////////////////////////////////////////////////////////////
  53.