Call this function to change the cursor shape while it is over the CRectTracker object's region. 复制 BOOL SetCursor( CWnd* pWnd, UINT nHitTest ) const; Parameters pWnd Points to the window that currently contains the cursor. nHitTest Results of the previous hit test, from the WM_SETCU...
Call this function to change the cursor shape while it is over theCRectTrackerobject's region. คัดลอก BOOL SetCursor( CWnd* pWnd, UINT nHitTest ) const; Parameters pWnd Points to the window that currently contains the cursor. ...
#include "stdafx.h" #include "KaRectTracker.h" #define new DEBUG_NEW / // CKaRectTracker global state // various GDI objects we need to draw AFX_STATIC_DATA HCURSOR _afxCursors[10] = { 0, }; AFX_STATIC_DATA HBRUSH _afxHatchBrush = 0; AFX_STATIC_DATA HPEN _afxBlackDottedPen = ...
三、CRectTracker类的简要说明和改造类CMyTracker, CMyTracker类中增加了更改矩形颜色方法,增加StyleFlags的resizeMiddle设置中 间位置,增加SetResizeCursor方法用开改变调整矩形大小和位置时鼠标光标,CRectTracker类中有几个重要的成员方法,一个是Draw方法 负责画出当前矩形,在此方法中可能更改矩形颜色,看如下代码 // draw...
afx_msg HCURSOR OnQueryDragIcon(); DECLARE_MESSAGE_MAP() public:afx_msg void OnLButtonDown(UINT nFlags, CPoint point); afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message); afx_msg void OnBnClickedButton1();//“绘制”按钮的响应函数 // afx_msg void OnChar(UINT ...
Returns the current position of the cursor related to theCRectTrackerobject. CRectTracker::NormalizeHit Normalizes a hit-test code. CRectTracker::OnChangedRect Called when the rectangle has been resized or moved. CRectTracker::SetCursor Sets the cursor, depending on its position over the rectangle. ...
CRectTracker::SetCursorLegt den Cursor abhängig von seiner Position über dem Rechteck fest. CRectTracker::TrackErmöglicht es dem Benutzer, das Rechteck zu bearbeiten. CRectTracker::TrackRubberBandErmöglicht dem Benutzer das "Gummiband" der Auswahl. ...
This function will capture the mouse until the user releases the left mouse button, presses the ESC key, or presses the right mouse button. As the user moves the mouse cursor, the feedback is updated by callingDrawTrackerRectandOnChangedRect. ...
CRectTracker::HitTest Returns the current position of the cursor related to the CRectTracker object. CRectTracker::NormalizeHit Normalizes a hit-test code. CRectTracker::OnChangedRect Called when the rectangle has been resized or moved. CRectTracker::SetCursor Sets the cursor, depending on its positio...
CRectTracker::HitTest Returns the current position of the cursor related to the CRectTracker object. CRectTracker::NormalizeHit Normalizes a hit-test code. CRectTracker::OnChangedRect Called when the rectangle has been resized or moved. CRectTracker::SetCursor Sets the cursor, depending on its positio...