⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 draglistctrl.h

📁 得到本周内的电视节目预告! f
💻 H
字号:
#if !defined(AFX_DRAGLISTCTRL_H__556364B5_DA63_4E16_BD50_15CAFC5736B0__INCLUDED_)
#define AFX_DRAGLISTCTRL_H__556364B5_DA63_4E16_BD50_15CAFC5736B0__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DragListCtrl.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CDragListCtrl window

class CDragListCtrl : public CListCtrl
{
// Construction
public:
	CDragListCtrl();

// Attributes
public:
	HCURSOR		m_hDraggingCursor;
	HCURSOR		m_hDisableCursor;

	BOOL IsDragging()const{return m_bDragging;}
	BOOL IsDragEnabled()const{return m_bDragEnabled;}
	void EnableDrag(BOOL bEnableDrag=TRUE){m_bDragEnabled = bEnableDrag;}

// Operations
public:
	void CancelDragging();
	int GetColumnCount();

// Overrides
	virtual BOOL OnQueryDrop(int iItem);
	virtual void OnEndDrag(int itemDrag, int itemDrop, CPoint point);
	virtual void MoveItem(int source, int dest);
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDragListCtrl)
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CDragListCtrl();

	// Generated message map functions
protected:
	BOOL			m_bDragEnabled;
	BOOL            m_bDragging;
	int             m_iItemDrag;
	int             m_iItemDrop;
	HCURSOR			m_hOldCursor;

	//{{AFX_MSG(CDragListCtrl)
	afx_msg void OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void OnDestroy();
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()
private:
	void DrawDropRect(int iItem);
	void EraseDropRect();
	void GetDropClientRect(LPRECT lpRect);
	void OnButtonUp(CPoint point);
	void ClearDrag();

	CPoint          m_ptHotSpot;
	CPoint          m_ptOrigin;
	CSize           m_sizeDelta;
	CImageList*     m_pimageListDrag;
	CRect*			m_lpRectLastDrop;
};

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

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

#endif // !defined(AFX_DRAGLISTCTRL_H__556364B5_DA63_4E16_BD50_15CAFC5736B0__INCLUDED_)

⌨️ 快捷键说明

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