home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / common / msdev98 / bin / ide / devgal.pkg / TEMPLATE / 22334 < prev    next >
Encoding:
Text File  |  1998-06-18  |  2.1 KB  |  72 lines

  1. // $$VAL:BaseViewHeader$$ : interface of the $$VAL:BaseViewClass$$ class
  2. //
  3. // This class provides a means for working with a Picture (bitmap)
  4. // view.  This is a limited implementation in that all repaints
  5. // are full screen repaints.  Palette changes are handled correctly.
  6. // This view class is intended to work with the CPictureDoc document
  7. // class.
  8. /////////////////////////////////////////////////////////////////////////////
  9.  
  10. #ifndef $$VAL:BaseViewWrapper$$
  11. #define $$VAL:BaseViewWrapper$$
  12.  
  13. $$IF:DocClassHeader$$
  14. #include "$$VAL:DocClassHeader$$"
  15. $$ENDIF$$
  16.  
  17.  class $$VAL:BaseViewClass$$ : public CScrollView
  18. {
  19. protected: // create from serialization only
  20.     $$VAL:BaseViewClass$$();
  21.     DECLARE_DYNCREATE(CPictureView)
  22.  
  23. // Attributes
  24. public:
  25.     $$VAL:DocClass$$* GetDocument();
  26.  
  27. // Operations
  28. public:
  29.  
  30. // Overrides
  31.     // ClassWizard generated virtual function overrides
  32.     //{{AFX_VIRTUAL($$VAL:BaseViewClass$$)
  33.     public:
  34.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  35.     virtual void OnInitialUpdate();
  36.     protected:
  37.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  38.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  39.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  40.     virtual void OnUpdate(CScrollView* pSender, LPARAM lHint, CObject* pHint);
  41.     //}}AFX_VIRTUAL
  42.  
  43. // Implementation
  44. public:
  45.     virtual ~$$VAL:BaseViewClass$$();
  46. #ifdef _DEBUG
  47.     virtual void AssertValid() const;
  48.     virtual void Dump(CDumpContext& dc) const;
  49. #endif
  50.  
  51. protected:
  52.  
  53. // Generated message map functions
  54. protected:
  55.     //{{AFX_MSG($$VAL:BaseViewClass$$)
  56.         // NOTE - the ClassWizard will add and remove member functions here.
  57.         //    DO NOT EDIT what you see in these blocks of generated code !
  58.     //}}AFX_MSG
  59.     afx_msg BOOL OnQueryNewPalette();
  60.     afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
  61.     DECLARE_MESSAGE_MAP()
  62. };
  63.  
  64. #ifndef _DEBUG  // debug version in $$VAL:BaseViewCpp$$
  65. inline $$VAL:DocClass$$* $$VAL:BaseViewClass$$::GetDocument()
  66.    { return ($$VAL:DocClass$$*)m_pDocument; }
  67. #endif
  68.  
  69. #endif        // $$VAL:BaseViewWrapper$$
  70.  
  71. /////////////////////////////////////////////////////////////////////////////
  72.