CntrItem.h
上传用户:y440e3
上传日期:2010-03-08
资源大小:200k
文件大小:2k
源码类别:

GIS编程

开发平台:

Visual C++

  1. // CntrItem.h : interface of the CDrawCntrItem class
  2. //
  3. #if !defined(AFX_CNTRITEM_H__0EFFC632_8953_11D2_AE7B_444553540000__INCLUDED_)
  4. #define AFX_CNTRITEM_H__0EFFC632_8953_11D2_AE7B_444553540000__INCLUDED_
  5. #if _MSC_VER >= 1000
  6. #pragma once
  7. #endif // _MSC_VER >= 1000
  8. class CDrawDoc;
  9. class CDrawView;
  10. class CDrawCntrItem : public COleClientItem
  11. {
  12. DECLARE_SERIAL(CDrawCntrItem)
  13. // Constructors
  14. public:
  15. CDrawCntrItem(CDrawDoc* 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. public:
  21. float m_X1,m_Y1,m_X2,m_Y2;
  22. BOOL b_Select; //是否选中
  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(CDrawCntrItem)
  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. BOOL IsPoint(CPoint point);
  42. void Draw(CDC* pDC);
  43. ~CDrawCntrItem();
  44. #ifdef _DEBUG
  45. virtual void AssertValid() const;
  46. virtual void Dump(CDumpContext& dc) const;
  47. #endif
  48. virtual void Serialize(CArchive& ar);
  49. };
  50. /////////////////////////////////////////////////////////////////////////////
  51. //{{AFX_INSERT_LOCATION}}
  52. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  53. #endif // !defined(AFX_CNTRITEM_H__0EFFC632_8953_11D2_AE7B_444553540000__INCLUDED_)