CntrItem.h
上传用户:seaboy_04
上传日期:2013-02-24
资源大小:284k
文件大小:2k
源码类别:

其他行业

开发平台:

Visual C++

  1. // CntrItem.h : interface of the CDrawItem class
  2. //
  3. #if !defined(AFX_CNTRITEM_H__1B01D2CD_13E2_4042_B354_6458D9F1A132__INCLUDED_)
  4. #define AFX_CNTRITEM_H__1B01D2CD_13E2_4042_B354_6458D9F1A132__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. class CDrawDoc;
  9. class CDrawView;
  10. class CDrawItem : public COleClientItem
  11. {
  12. DECLARE_SERIAL(CDrawItem)
  13. // Constructors
  14. public:
  15. BOOL UpdateExtent();
  16. CDrawOleObj* m_pDrawObj;
  17. // CDrawItem(CDrawDoc* pContainer = NULL);
  18. CDrawItem(CDrawDoc* pContainer = NULL, CDrawOleObj* pDrawObj = NULL);
  19. // Note: pContainer is allowed to be NULL to enable IMPLEMENT_SERIALIZE.
  20. //  IMPLEMENT_SERIALIZE requires the class have a constructor with
  21. //  zero arguments.  Normally, OLE items are constructed with a
  22. //  non-NULL document pointer.
  23. // Attributes
  24. public:
  25. CDrawDoc* GetDocument()
  26. { return (CDrawDoc*)COleClientItem::GetDocument(); }
  27. CDrawView* GetActiveView()
  28. { return (CDrawView*)COleClientItem::GetActiveView(); }
  29. // ClassWizard generated virtual function overrides
  30. //{{AFX_VIRTUAL(CDrawItem)
  31. public:
  32. virtual void OnChange(OLE_NOTIFICATION wNotification, DWORD dwParam);
  33. virtual void OnActivate();
  34. protected:
  35. virtual void OnGetItemPosition(CRect& rPosition);
  36. virtual void OnDeactivateUI(BOOL bUndoable);
  37. virtual BOOL OnChangeItemPosition(const CRect& rectPos);
  38. //}}AFX_VIRTUAL
  39. // Implementation
  40. public:
  41. ~CDrawItem();
  42. #ifdef _DEBUG
  43. virtual void AssertValid() const;
  44. virtual void Dump(CDumpContext& dc) const;
  45. #endif
  46. virtual void Serialize(CArchive& ar);
  47. };
  48. /////////////////////////////////////////////////////////////////////////////
  49. //{{AFX_INSERT_LOCATION}}
  50. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  51. #endif // !defined(AFX_CNTRITEM_H__1B01D2CD_13E2_4042_B354_6458D9F1A132__INCLUDED_)