#pragma once #include "item.h" namespace NItem { class CItemFocusRect : public CItem { public: CItemFocusRect(CSigmaDoc * ppDoc); virtual ~CItemFocusRect(void); protected: CPoint2D c_down,c_last; CRect m_oldRect; BOOL m_bShiftDown; int m_nDrawMode;//0为焦点矩形式,1为直线式,2为矩形式 void DrawMode(CDC *pDC, CRect8* pRect); public: void OnLButtonDown(CDC *pDC, UINT nFlags, CPoint point, int vk) override; void OnLButtonUp(CDC *pDC, UINT nFlags, CPoint point, int vk) override; int OnMouseMove(CDC *pDC, UINT nFlags, CPoint point) override; BOOL OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) override; BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message) override; virtual void DoDrawOther(CDC* pDC, int nButton); //1=左键DOWN,2=鼠标移动,3=左键UP virtual void DoLButtonUp(CDC *pDC); CRect8 GetRect(void); BOOL m_IsFocusing = FALSE; BOOL IsTransformFirst = TRUE; }; };