home *** CD-ROM | disk | FTP | other *** search
- // $$VAL:BaseDocHeader$$ : interface of the $$VAL:BaseDocClass$$ class
- //
- // This class provides a means for working with a Picture (bitmap)
- // document. This is a limited implementation in that there is no
- // ability to save or edit a document of this type. Error handling
- // on open is also handled less than completely gracefully and
- // error message text is scattered in place where needed (rather than
- // stored externally in the string resources).
- /////////////////////////////////////////////////////////////////////////////
-
- #ifndef $$VAL:BaseDocWrapper$$
- #define $$VAL:BaseDocWrapper$$
-
- class $$VAL:BaseDocClass$$ : public CDocument
- {
- protected: // create from serialization only
- $$VAL:BaseDocClass$$();
- DECLARE_DYNCREATE($$VAL:BaseDocClass$$)
-
- // Attributes
- public:
- CBitmap m_Bitmap;
- CPalette m_Palette;
-
- // Operations
- public:
- CSize GetSize() const;
- CPalette *GetPalette();
- BOOL NormalizeColors(LPBITMAPINFO lpbiDest, LPBITMAPINFO lpbiSrc);
-
- protected:
- void DoMessageBox(CString str);
-
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL($$VAL:BaseDocClass$$)
- public:
- virtual BOOL OnNewDocument();
- virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
- virtual void DeleteContents();
- virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
- //}}AFX_VIRTUAL
-
- // Implementation
- public:
- virtual ~$$VAL:BaseDocClass$$();
- virtual void Serialize(CArchive& ar); // overridden for document i/o
- #ifdef _DEBUG
- virtual void AssertValid() const;
- virtual void Dump(CDumpContext& dc) const;
- #endif
-
- protected:
-
- // Generated message map functions
- protected:
- //{{AFX_MSG($$VAL:BaseDocClass$$)
- // NOTE - the ClassWizard will add and remove member functions here.
- // DO NOT EDIT what you see in these blocks of generated code !
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
-
- #endif // $$VAL:BaseDocWrapper$$
-
- /////////////////////////////////////////////////////////////////////////////
-