home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c05 / tool / toolview.h < prev   
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.4 KB  |  58 lines

  1. // ToolView.h : interface of the CToolView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. class CToolView : public CView
  6. {
  7. protected: // create from serialization only
  8.     CToolView();
  9.     DECLARE_DYNCREATE(CToolView)
  10.  
  11. // Attributes
  12. public:
  13.     CToolDoc* GetDocument();
  14.  
  15. // Operations
  16. public:
  17.  
  18. // Overrides
  19.     // ClassWizard generated virtual function overrides
  20.     //{{AFX_VIRTUAL(CToolView)
  21.     public:
  22.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  23.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  24.     protected:
  25.     //}}AFX_VIRTUAL
  26.  
  27. // Implementation
  28. public:
  29.     virtual ~CToolView();
  30. #ifdef _DEBUG
  31.     virtual void AssertValid() const;
  32.     virtual void Dump(CDumpContext& dc) const;
  33. #endif
  34.  
  35. protected:
  36.  
  37. // Generated message map functions
  38. protected:
  39.     //{{AFX_MSG(CToolView)
  40.     afx_msg void OnColorsBlack();
  41.     afx_msg void OnColorsBlue();
  42.     afx_msg void OnColorsGreen();
  43.     afx_msg void OnColorsRed();
  44.     afx_msg void OnUpdateColorsBlack(CCmdUI* pCmdUI);
  45.     afx_msg void OnUpdateColorsBlue(CCmdUI* pCmdUI);
  46.     afx_msg void OnUpdateColorsGreen(CCmdUI* pCmdUI);
  47.     afx_msg void OnUpdateColorsRed(CCmdUI* pCmdUI);
  48.     //}}AFX_MSG
  49.     DECLARE_MESSAGE_MAP()
  50. };
  51.  
  52. #ifndef _DEBUG  // debug version in ToolView.cpp
  53. inline CToolDoc* CToolView::GetDocument()
  54.    { return (CToolDoc*)m_pDocument; }
  55. #endif
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58.