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 / 22333 < prev    next >
Encoding:
Text File  |  1998-06-18  |  1.9 KB  |  67 lines

  1. // $$VAL:BaseDocHeader$$ : interface of the $$VAL:BaseDocClass$$ class
  2. //
  3. // This class provides a means for working with a Picture (bitmap)
  4. // document.  This is a limited implementation in that there is no
  5. // ability to save or edit a document of this type.  Error handling
  6. // on open is also handled less than completely gracefully and
  7. // error message text is scattered in place where needed (rather than
  8. // stored externally in the string resources).
  9. /////////////////////////////////////////////////////////////////////////////
  10.  
  11. #ifndef $$VAL:BaseDocWrapper$$
  12. #define $$VAL:BaseDocWrapper$$
  13.  
  14. class $$VAL:BaseDocClass$$ : public CDocument
  15. {
  16. protected: // create from serialization only
  17.     $$VAL:BaseDocClass$$();
  18.     DECLARE_DYNCREATE($$VAL:BaseDocClass$$)
  19.  
  20. // Attributes
  21. public:
  22.     CBitmap m_Bitmap;
  23.     CPalette m_Palette;
  24.  
  25. // Operations
  26. public:
  27.     CSize GetSize() const;
  28.     CPalette *GetPalette();
  29.     BOOL NormalizeColors(LPBITMAPINFO lpbiDest, LPBITMAPINFO lpbiSrc);
  30.  
  31. protected:
  32.     void DoMessageBox(CString str);
  33.  
  34. // Overrides
  35.     // ClassWizard generated virtual function overrides
  36.     //{{AFX_VIRTUAL($$VAL:BaseDocClass$$)
  37.     public:
  38.     virtual BOOL OnNewDocument();
  39.     virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  40.     virtual void DeleteContents();
  41.     virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
  42.     //}}AFX_VIRTUAL
  43.  
  44. // Implementation
  45. public:
  46.     virtual ~$$VAL:BaseDocClass$$();
  47.     virtual void Serialize(CArchive& ar);   // overridden for document i/o
  48. #ifdef _DEBUG
  49.     virtual void AssertValid() const;
  50.     virtual void Dump(CDumpContext& dc) const;
  51. #endif
  52.  
  53. protected:
  54.  
  55. // Generated message map functions
  56. protected:
  57.     //{{AFX_MSG($$VAL:BaseDocClass$$)
  58.         // NOTE - the ClassWizard will add and remove member functions here.
  59.         //    DO NOT EDIT what you see in these blocks of generated code !
  60.     //}}AFX_MSG
  61.     DECLARE_MESSAGE_MAP()
  62. };
  63.  
  64. #endif        // $$VAL:BaseDocWrapper$$
  65.  
  66. /////////////////////////////////////////////////////////////////////////////
  67.