home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c06 / lab05 / baseline / diffview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.7 KB  |  66 lines

  1. // diffView.h : interface of the CDiffView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CDiffView : public CRichEditView
  6. {
  7. protected: // create from serialization only
  8.     CDiffView();
  9.     DECLARE_DYNCREATE(CDiffView)
  10.  
  11. // Attributes
  12. public:
  13.     CDiffDoc* GetDocument();
  14.  
  15. protected:
  16.     CHARFORMAT    m_CharacterFormat;
  17.      COLORREF    m_ForegroundColor;
  18.     COLORREF    m_BackgroundColor;
  19.  
  20. // Operations
  21. public:
  22.  
  23. // Overrides
  24.     // ClassWizard generated virtual function overrides
  25.     //{{AFX_VIRTUAL(CDiffView)
  26.     public:
  27.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  28.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  29.     virtual void OnInitialUpdate();
  30.     protected:
  31.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  32.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  33.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  34.     //}}AFX_VIRTUAL
  35.  
  36. // Implementation
  37. public:
  38.     virtual ~CDiffView();
  39. #ifdef _DEBUG
  40.     virtual void AssertValid() const;
  41.     virtual void Dump(CDumpContext& dc) const;
  42. #endif
  43.  
  44. protected:
  45.  
  46.  
  47. // Generated message map functions
  48. protected:
  49.     //{{AFX_MSG(CDiffView)
  50.     afx_msg void OnContextMenu(CWnd *pWnd, CPoint point);
  51.     afx_msg void OnDropFiles(HDROP hDropInfo);
  52.     afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  53.     afx_msg void OnEditFont();
  54.     afx_msg void OnEditColorBackground();
  55.     afx_msg void OnEditColorForeground();
  56.     //}}AFX_MSG
  57.     DECLARE_MESSAGE_MAP()
  58. };
  59.  
  60. #ifndef _DEBUG  // debug version in diffView.cpp
  61. inline CDiffDoc* CDiffView::GetDocument()
  62.    { return (CDiffDoc*)m_pDocument; }
  63. #endif
  64.  
  65. /////////////////////////////////////////////////////////////////////////////
  66.