home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / labs / c06 / lab05 / ex03 / diffview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.8 KB  |  68 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.     void GetCharacterFormat(CHARFORMAT &CharFmt);
  15.     void SetCharacterFormat(CHARFORMAT &CharFmt);
  16.  
  17. protected:
  18.     CHARFORMAT    m_CharacterFormat;
  19.       COLORREF    m_ForegroundColor;
  20.     COLORREF    m_BackgroundColor;
  21.  
  22. // Operations
  23. public:
  24.  
  25. // Overrides
  26.     // ClassWizard generated virtual function overrides
  27.     //{{AFX_VIRTUAL(CDiffView)
  28.     public:
  29.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  30.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  31.     virtual void OnInitialUpdate();
  32.     protected:
  33.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  34.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  35.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  36.     //}}AFX_VIRTUAL
  37.  
  38. // Implementation
  39. public:
  40.     virtual ~CDiffView();
  41. #ifdef _DEBUG
  42.     virtual void AssertValid() const;
  43.     virtual void Dump(CDumpContext& dc) const;
  44. #endif
  45.  
  46. protected:
  47.  
  48.  
  49. // Generated message map functions
  50. protected:
  51.     //{{AFX_MSG(CDiffView)
  52.     afx_msg void OnContextMenu(CWnd *pWnd, CPoint point);
  53.     afx_msg void OnDropFiles(HDROP hDropInfo);
  54.     afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
  55.     afx_msg void OnEditFont();
  56.     afx_msg void OnEditColorBackground();
  57.     afx_msg void OnEditColorForeground();
  58.     //}}AFX_MSG
  59.     DECLARE_MESSAGE_MAP()
  60. };
  61.  
  62. #ifndef _DEBUG  // debug version in diffView.cpp
  63. inline CDiffDoc* CDiffView::GetDocument()
  64.    { return (CDiffDoc*)m_pDocument; }
  65. #endif
  66.  
  67. /////////////////////////////////////////////////////////////////////////////
  68.