home *** CD-ROM | disk | FTP | other *** search
/ Using Visual C++ 4 (Special Edition) / Using_Visual_C_4_Special_Edition_QUE_1996.iso / ch06 / filevvw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-30  |  1.7 KB  |  67 lines

  1. // FileVVw.h : interface of the CFileViewView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CFileViewView : public CView
  6. {
  7. protected: // create from serialization only
  8.     CFileViewView();
  9.     DECLARE_DYNCREATE(CFileViewView)
  10.  
  11.     int currentLine;
  12.     int margin;
  13.     CFont *ourFont;
  14.     int lHeight;
  15.     int cWidth;
  16.     int saveLHeight, saveCWidth;
  17.     int saveCurrentLine;
  18.     CRect printerRect;
  19.  
  20. // Attributes
  21. public:
  22.     CFileViewDoc* GetDocument();
  23.  
  24. // Operations
  25. public:
  26.  
  27. // Overrides
  28.     // ClassWizard generated virtual function overrides
  29.     //{{AFX_VIRTUAL(CFileViewView)
  30.     public:
  31.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  32.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  33.     virtual void OnInitialUpdate();
  34.     virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
  35.     protected:
  36.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  37.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  38.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  39.     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  40.     //}}AFX_VIRTUAL
  41.  
  42. // Implementation
  43. public:
  44.     virtual ~CFileViewView();
  45. #ifdef _DEBUG
  46.     virtual void AssertValid() const;
  47.     virtual void Dump(CDumpContext& dc) const;
  48. #endif
  49.  
  50. protected:
  51.  
  52. // Generated message map functions
  53. protected:
  54.     //{{AFX_MSG(CFileViewView)
  55.     afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  56.     afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  57.     //}}AFX_MSG
  58.     DECLARE_MESSAGE_MAP()
  59. };
  60.  
  61. #ifndef _DEBUG  // debug version in FileVVw.cpp
  62. inline CFileViewDoc* CFileViewView::GetDocument()
  63.    { return (CFileViewDoc*)m_pDocument; }
  64. #endif
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.