recttrackerex.h

来自「thinking in java 3rd 英文版的」· C头文件 代码 · 共 57 行

H
57
字号
#if !defined(AFX_RECTTRACKEREX_H__FD8D665A_C1D8_423A_B857_BCB81886DF60__INCLUDED_)
#define AFX_RECTTRACKEREX_H__FD8D665A_C1D8_423A_B857_BCB81886DF60__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// RectTrackerEx class: kylin create 2004-04-14
//

/////////////////////////////////////////////////////////////////////////////
// CRectTrackerEx window

class CRectTrackerEx : public CRectTracker
{
// Construction
public:
	CRectTrackerEx();

// Attributes
public:

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CRectTrackerEx)
	virtual void OnChangedRect(const CRect& rectOld);
	virtual void AdjustRect( int nHandle, LPRECT lpRect );
	//}}AFX_VIRTUAL

// Implementation
public:
	BOOL SetMinInterval(int nHorInterval, int nVerInterval);//拖动时水平和竖直方向的最小间隔
	void SetLimitRegion(int l, int t, int r, int b);//tracker只能在一区域中拖动
	void SetLimitRegion(POINT topLeft, POINT bottomRight);
	void SetLimitRegion(RECT rcGegion);
	virtual ~CRectTrackerEx();

protected:
	
private:
	void NormalizeRect(LPRECT lpRect);
	BOOL   m_bLimit;//是否被限制拖动
	CRect  m_rcLimit;//限制的矩形区域

	int   m_nMinHeight;
    int   m_nMinWidth;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_RECTTRACKEREX_H__FD8D665A_C1D8_423A_B857_BCB81886DF60__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?