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