home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / MFC / SAMPLES / VIEWEX / SIMPVW.H_ / SIMPVW.H
Encoding:
C/C++ Source or Header  |  1993-02-08  |  2.2 KB  |  85 lines

  1. // simpvw.h : interface of the simple view classes
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and Microsoft
  9. // QuickHelp and/or WinHelp documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. // CTextView - text output
  15. // CColorView - color output
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18.  
  19. class CTextView : public CView
  20. {
  21. protected: // create from serialization only
  22.     CTextView();
  23.     DECLARE_DYNCREATE(CTextView)
  24.  
  25. // Attributes
  26. public:
  27.     CMainDoc* GetDocument()
  28.             {
  29.                 ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  30.                 return (CMainDoc*) m_pDocument;
  31.             }
  32.  
  33. // Operations
  34. public:
  35.  
  36. // Implementation
  37. public:
  38.     virtual ~CTextView();
  39.     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
  40.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  41.  
  42. // Generated message map functions
  43. protected:
  44.     //{{AFX_MSG(CTextView)
  45.     afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
  46.     //}}AFX_MSG
  47.     DECLARE_MESSAGE_MAP()
  48. };
  49.  
  50. /////////////////////////////////////////////////////////////////////////////
  51.  
  52. class CColorView : public CView
  53. {
  54. protected: // create from serialization only
  55.     CColorView();
  56.     DECLARE_DYNCREATE(CColorView)
  57.  
  58. // Attributes
  59. public:
  60.     CMainDoc* GetDocument()
  61.             {
  62.                 ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  63.                 return (CMainDoc*) m_pDocument;
  64.             }
  65.  
  66. // Operations
  67. public:
  68.  
  69. // Implementation
  70. public:
  71.     virtual ~CColorView();
  72.     virtual void OnDraw(CDC* pDC);      // overridden to draw this view
  73.     virtual void OnActivateView(BOOL bActivate, CView* pActivateView,
  74.                     CView* pDeactiveView);
  75.  
  76. // Generated message map functions
  77. protected:
  78.     //{{AFX_MSG(CColorView)
  79.     afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
  80.     //}}AFX_MSG
  81.     DECLARE_MESSAGE_MAP()
  82. };
  83.  
  84. /////////////////////////////////////////////////////////////////////////////
  85.