Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
3.2 KiB

  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-1995 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 related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. // CTextView - text output
  13. // CColorView - color output
  14. /////////////////////////////////////////////////////////////////////////////
  15. class CTextView : public CView
  16. {
  17. protected: // create from serialization only
  18. CTextView();
  19. DECLARE_DYNCREATE(CTextView)
  20. // Attributes
  21. public:
  22. CMainDoc* GetDocument()
  23. {
  24. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  25. return (CMainDoc*) m_pDocument;
  26. }
  27. // Operations
  28. public:
  29. // Implementation
  30. public:
  31. virtual ~CTextView();
  32. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  33. // Generated message map functions
  34. protected:
  35. //{{AFX_MSG(CTextView)
  36. afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
  37. //}}AFX_MSG
  38. DECLARE_MESSAGE_MAP()
  39. };
  40. /////////////////////////////////////////////////////////////////////////////
  41. class CColorView : public CView
  42. {
  43. protected: // create from serialization only
  44. CColorView();
  45. DECLARE_DYNCREATE(CColorView)
  46. // Attributes
  47. public:
  48. CMainDoc* GetDocument()
  49. {
  50. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  51. return (CMainDoc*) m_pDocument;
  52. }
  53. // Operations
  54. public:
  55. // Implementation
  56. public:
  57. virtual ~CColorView();
  58. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  59. virtual void OnActivateView(BOOL bActivate, CView* pActivateView,
  60. CView* pDeactiveView);
  61. // Generated message map functions
  62. protected:
  63. //{{AFX_MSG(CColorView)
  64. afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. };
  68. /////////////////////////////////////////////////////////////////////////////
  69. /////////////////////////////////////////////////////////////////////////////
  70. // CNameView view
  71. class CNameView : public CEditView
  72. {
  73. protected:
  74. CNameView(); // protected constructor used by dynamic creation
  75. DECLARE_DYNCREATE(CNameView)
  76. // Attributes
  77. public:
  78. CMainDoc* GetDocument()
  79. {
  80. ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
  81. return (CMainDoc*) m_pDocument;
  82. }
  83. // Operations
  84. public:
  85. // Overrides
  86. // ClassWizard generated virtual function overrides
  87. //{{AFX_VIRTUAL(CNameView)
  88. protected:
  89. virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  90. //}}AFX_VIRTUAL
  91. // Implementation
  92. protected:
  93. virtual ~CNameView();
  94. #ifdef _DEBUG
  95. virtual void AssertValid() const;
  96. virtual void Dump(CDumpContext& dc) const;
  97. #endif
  98. // Generated message map functions
  99. protected:
  100. //{{AFX_MSG(CNameView)
  101. // NOTE - the ClassWizard will add and remove member functions here.
  102. //}}AFX_MSG
  103. DECLARE_MESSAGE_MAP()
  104. };
  105. /////////////////////////////////////////////////////////////////////////////