home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 December / PCWKCD1296.iso / vjplusb / activex / inetsdk / samples / urlpad / paditem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-05-29  |  1.3 KB  |  48 lines

  1. //=------------------------------------------------------------------------=
  2. // PadItem.h
  3. //=------------------------------------------------------------------------=
  4. // Copyright 1992-1996 Microsoft Corporation.  All Rights Reserved.
  5. //
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  7. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  8. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  9. // PARTICULAR PURPOSE.
  10. //=--------------------------------------------------------------------------=
  11. //
  12. // Definition of the CEmbeddedItem class
  13. //
  14.  
  15. #ifndef __PADITEM_H__
  16. #define __PADITEM_H__
  17.  
  18. class CPadDoc;
  19. class CPadView;
  20.  
  21. class CEmbeddedItem : public COleServerItem
  22. {
  23.     DECLARE_DYNAMIC(CEmbeddedItem)
  24.  
  25. // Constructors
  26. public:
  27.     CEmbeddedItem(CPadDoc* pContainerDoc);
  28.  
  29. // Attributes
  30.     UINT m_nBeg, m_nEnd;
  31.     CPadDoc* GetDocument() const
  32.         { return (CPadDoc*) COleServerItem::GetDocument(); }
  33.     CPadView* GetView() const;
  34.  
  35. // Implementation
  36. public:
  37.     virtual BOOL OnDraw(CDC* pDC, CSize& rSize);
  38.     virtual BOOL OnGetExtent(DVASPECT dwDrawAspect, CSize& rSize);
  39.  
  40. protected:
  41.     virtual BOOL OnRenderFileData(LPFORMATETC lpFormatEtc, CFile* pFile);
  42.     virtual void Serialize(CArchive& ar);   // overridden for document i/o
  43.  
  44.     void SaveToFile(CFile* pFile);
  45. };
  46.  
  47. #endif  // __PADITEM_H__
  48.