home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / C++-7 / DISK8 / MFC / SAMPLES / OSERVER / BIBITEM.H$ / bibitem
Encoding:
Text File  |  1992-01-15  |  1.5 KB  |  57 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and Microsoft
  7. // QuickHelp documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. /////////////////////////////////////////////////////////////////////////////
  12.  
  13. #ifndef __AFXOLE_H__
  14. #include <afxole.h>
  15. #endif
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CBibItem : Bibliographic reference
  19.  
  20. class CBibDoc;
  21.  
  22. class CBibItem : public COleServerItem
  23. {
  24. protected:
  25.     CString     m_key;
  26.  
  27. public:
  28.     CBibItem(const char* pszKey);
  29.  
  30.     CBibDoc*    GetDocument() const // type cast helper
  31.                     { return (CBibDoc*) COleServerItem::GetDocument(); }
  32.  
  33. // Operations
  34.     void    ChangeKey(const CString& newKey)
  35.                     { m_key = newKey; }
  36.  
  37. // Overridables
  38. protected:
  39.     virtual OLESTATUS   OnShow(BOOL bTakeFocus);
  40.     virtual BOOL        OnDraw(CMetaFileDC* pDC);
  41.  
  42.     virtual void        Serialize(CArchive& ar);        // for native data
  43.     virtual BOOL        OnGetTextData(CString& rStringReturn);
  44.  
  45.     // cleanup (call COleServerItem::Release then delete your object)
  46.     virtual OLESTATUS   OnRelease();
  47.  
  48. #ifdef _DEBUG
  49. public:
  50.     virtual void Dump(CDumpContext& dc) const;
  51.     virtual void AssertValid() const;
  52. #endif
  53. };
  54.  
  55. /////////////////////////////////////////////////////////////////////////////
  56.  
  57.