// UserDropTarget.h: interface for the CUserDropTarget class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_USERDROPTARGET_H__EEF32CBE_6C22_4920_B9DB_08DA9CD933CB__INCLUDED_) #define AFX_USERDROPTARGET_H__EEF32CBE_6C22_4920_B9DB_08DA9CD933CB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #define DROPM_DROP WM_USER + 1978 class CUserDropTarget : public COleDropTarget { public: CUserDropTarget(); virtual ~CUserDropTarget(); protected: //处理OnDropEx消息是必须的,否则OnDrop函数不会被执行 //当然也可以在OnDropEx函数中处理数据 virtual DROPEFFECT OnDragEnter(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point); virtual DROPEFFECT OnDragOver(CWnd* pWnd, COleDataObject* pDataObject, DWORD dwKeyState, CPoint point); virtual BOOL OnDrop(CWnd* pWnd, COleDataObject* pDataObject, DROPEFFECT dropEffect, CPoint point); virtual void OnDragLeave(CWnd* pWnd); // virtual DROPEFFECT OnDropEx(CWnd* pWnd, COleDataObject* pDataObject, // DROPEFFECT dropEffect, DROPEFFECT dropEffectList, CPoint point); public: //Static variable to store the window handle of source tree control static HWND m_shWndTreeCtrl; static long m_lAddressType; }; #endif // !defined(AFX_USERDROPTARGET_H__EEF32CBE_6C22_4920_B9DB_08DA9CD933CB__INCLUDED_)