home *** CD-ROM | disk | FTP | other *** search
/ Mastering Microsoft Visual C++ 4 (2nd Edition) / VisualC4.ISO / textdemo / textdevw.h < prev   
Encoding:
C/C++ Source or Header  |  1995-11-30  |  1.4 KB  |  54 lines

  1. // TextDeVw.h : interface of the CTextDemoView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. const int MARGIN = 10;     // margin displayed at top and left of view window
  6.  
  7. class CTextDemoView : public CScrollView
  8. {
  9. protected: // create from serialization only
  10.    CTextDemoView();
  11.    DECLARE_DYNCREATE(CTextDemoView)
  12.  
  13. // Attributes
  14. public:
  15.    CTextDemoDoc* GetDocument();
  16.  
  17. // Operations
  18. public:
  19.  
  20. // Overrides
  21.    // ClassWizard generated virtual function overrides
  22.    //{{AFX_VIRTUAL(CTextDemoView)
  23.    public:
  24.    virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  25.    virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  26.    protected:
  27.    virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  28.    //}}AFX_VIRTUAL
  29.  
  30. // Implementation
  31. public:
  32.    virtual ~CTextDemoView();
  33. #ifdef _DEBUG
  34.    virtual void AssertValid() const;
  35.    virtual void Dump(CDumpContext& dc) const;
  36. #endif
  37.  
  38. protected:
  39.  
  40. // Generated message map functions
  41. protected:
  42.    //{{AFX_MSG(CTextDemoView)
  43.    afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  44.    //}}AFX_MSG
  45.    DECLARE_MESSAGE_MAP()
  46. };
  47.  
  48. #ifndef _DEBUG  // debug version in TextDeVw.cpp
  49. inline CTextDemoDoc* CTextDemoView::GetDocument()
  50.    { return (CTextDemoDoc*)m_pDocument; }
  51. #endif
  52.  
  53. /////////////////////////////////////////////////////////////////////////////
  54.