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
132 lines
3.2 KiB
// simpvw.h : interface of the simple view classes
|
|
//
|
|
// This is a part of the Microsoft Foundation Classes C++ library.
|
|
// Copyright (C) 1992-1995 Microsoft Corporation
|
|
// All rights reserved.
|
|
//
|
|
// This source code is only intended as a supplement to the
|
|
// Microsoft Foundation Classes Reference and related
|
|
// electronic documentation provided with the library.
|
|
// See these sources for detailed information regarding the
|
|
// Microsoft Foundation Classes product.
|
|
|
|
// CTextView - text output
|
|
// CColorView - color output
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
class CTextView : public CView
|
|
{
|
|
protected: // create from serialization only
|
|
CTextView();
|
|
DECLARE_DYNCREATE(CTextView)
|
|
|
|
// Attributes
|
|
public:
|
|
CMainDoc* GetDocument()
|
|
{
|
|
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
|
|
return (CMainDoc*) m_pDocument;
|
|
}
|
|
|
|
// Operations
|
|
public:
|
|
|
|
// Implementation
|
|
public:
|
|
virtual ~CTextView();
|
|
virtual void OnDraw(CDC* pDC); // overridden to draw this view
|
|
|
|
// Generated message map functions
|
|
protected:
|
|
//{{AFX_MSG(CTextView)
|
|
afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
class CColorView : public CView
|
|
{
|
|
protected: // create from serialization only
|
|
CColorView();
|
|
DECLARE_DYNCREATE(CColorView)
|
|
|
|
// Attributes
|
|
public:
|
|
CMainDoc* GetDocument()
|
|
{
|
|
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
|
|
return (CMainDoc*) m_pDocument;
|
|
}
|
|
|
|
// Operations
|
|
public:
|
|
|
|
// Implementation
|
|
public:
|
|
virtual ~CColorView();
|
|
virtual void OnDraw(CDC* pDC); // overridden to draw this view
|
|
virtual void OnActivateView(BOOL bActivate, CView* pActivateView,
|
|
CView* pDeactiveView);
|
|
|
|
// Generated message map functions
|
|
protected:
|
|
//{{AFX_MSG(CColorView)
|
|
afx_msg int OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message);
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CNameView view
|
|
|
|
class CNameView : public CEditView
|
|
{
|
|
protected:
|
|
CNameView(); // protected constructor used by dynamic creation
|
|
DECLARE_DYNCREATE(CNameView)
|
|
|
|
// Attributes
|
|
public:
|
|
CMainDoc* GetDocument()
|
|
{
|
|
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CMainDoc)));
|
|
return (CMainDoc*) m_pDocument;
|
|
}
|
|
|
|
|
|
// Operations
|
|
public:
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CNameView)
|
|
protected:
|
|
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
virtual ~CNameView();
|
|
#ifdef _DEBUG
|
|
virtual void AssertValid() const;
|
|
virtual void Dump(CDumpContext& dc) const;
|
|
#endif
|
|
|
|
// Generated message map functions
|
|
protected:
|
|
//{{AFX_MSG(CNameView)
|
|
// NOTE - the ClassWizard will add and remove member functions here.
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|