home *** CD-ROM | disk | FTP | other *** search
/ Mastering MFC Development / MMD.ISO / samples / c07 / mdiapp / mdiview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-20  |  1.4 KB  |  56 lines

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