DrawRect.h
上传用户:mosfetic
上传日期:2022-06-16
资源大小:4612k
文件大小:1k
源码类别:

GDI/图象编程

开发平台:

Visual C++

  1. // DrawRect.h: interface for the CDrawRect class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_DRAWRECT_H__7597DBF9_39FD_4BAE_8F76_11A0E4B9E8A5__INCLUDED_)
  5. #define AFX_DRAWRECT_H__7597DBF9_39FD_4BAE_8F76_11A0E4B9E8A5__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "DrawShape.h"
  10. class CDrawRect : public CDrawShape  
  11. {
  12. DECLARE_SERIAL(CDrawRect)
  13. private:
  14. CPoint m_ptFirst;
  15. CPoint m_ptSecond;
  16. CPoint m_ptTemp;
  17. BOOL m_bStart;
  18. public:
  19. CDrawRect();
  20. virtual ~CDrawRect();
  21. virtual void Draw(CDC* pDC);
  22. virtual void OnMouseMove(CDC* pDC, UINT nFlags, CPoint point);
  23. virtual void OnLButtonDown(CDC* pDC, UINT nFlags, CPoint point);
  24. virtual BOOL OnLButtonUp(CDC* pDC, UINT nFlags, CPoint point);
  25. virtual void Serialize(CArchive& ar);
  26. virtual BOOL PtInShape(CPoint point);
  27. virtual void ShowProperty();
  28. };
  29. #endif // !defined(AFX_DRAWRECT_H__7597DBF9_39FD_4BAE_8F76_11A0E4B9E8A5__INCLUDED_)