home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / wordpad / wordpdoc.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  2KB  |  78 lines

  1. // wordpdoc.h : interface of the CWordPadDoc class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. class CFormatBar;
  14. class CWordPadSrvrItem;
  15. class CWordPadView;
  16.  
  17. class CWordPadDoc : public CRichEditDoc
  18. {
  19. protected: // create from serialization only
  20.     CWordPadDoc();
  21.     DECLARE_DYNCREATE(CWordPadDoc)
  22.  
  23. // Attributes
  24. public:
  25.     int m_nDocType;
  26.     int m_nNewDocType;
  27.     void SetDocType(int nDocType, BOOL bNoOptionChange = FALSE);
  28.     CWordPadView* GetView();
  29.     CLSID GetClassID();
  30.     LPCTSTR GetSection();
  31.  
  32. // Operations
  33. public:
  34.     void SaveState(int nType);
  35.     void RestoreState(int nType);
  36.     virtual CFile* GetFile(LPCTSTR pszPathName, UINT nOpenFlags,
  37.         CFileException* pException);
  38.     virtual BOOL DoSave(LPCTSTR pszPathName, BOOL bReplace = TRUE);
  39.     int MapType(int nType);
  40.     void ForceDelayed(CFrameWnd* pFrameWnd);
  41.  
  42. // Overrides
  43.     virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo) const;
  44.     virtual void OnDeactivateUI(BOOL bUndoable);
  45.     virtual void Serialize(CArchive& ar);
  46.     // ClassWizard generated virtual function overrides
  47.     //{{AFX_VIRTUAL(CWordPadDoc)
  48.     public:
  49.     virtual BOOL OnNewDocument();
  50.     virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
  51.     virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
  52.     virtual void OnCloseDocument();
  53.     virtual void ReportSaveLoadException(LPCTSTR lpszPathName, CException* e, BOOL bSaving, UINT nIDPDefault);
  54.     protected:
  55.     virtual COleServerItem* OnGetEmbeddedItem();
  56.     //}}AFX_VIRTUAL
  57.  
  58. // Implementation
  59. public:
  60.     virtual void PreCloseFrame(CFrameWnd* pFrameArg);
  61. #ifdef _DEBUG
  62.     virtual void AssertValid() const;
  63.     virtual void Dump(CDumpContext& dc) const;
  64. #endif
  65.  
  66. // Generated message map functions
  67. protected:
  68.     //{{AFX_MSG(CWordPadDoc)
  69.     afx_msg void OnViewOptions();
  70.     afx_msg void OnUpdateOleVerbPopup(CCmdUI* pCmdUI);
  71.     afx_msg void OnFileSendMail();
  72.     afx_msg void OnUpdateIfEmbedded(CCmdUI* pCmdUI);
  73.     //}}AFX_MSG
  74.     DECLARE_MESSAGE_MAP()
  75. };
  76.  
  77. /////////////////////////////////////////////////////////////////////////////
  78.