25 pPair->m_value->Release();
34 pDropTarget->AddRef();
43 pPair->m_value->Release();
49#define __uuidofsys __uuidof
51#define __uuidofsys __suidof
58 if (riid == __uuidofsys(IUnknown))
59 *ppvObject = (IUnknown *)
this, hr = S_OK;
60 else if (riid == __uuidofsys(IDropTarget))
61 *ppvObject = (IDropTarget *)
this, hr = S_OK;
72 return DragOver(grfKeyState, pt, pdwEffect);
79 *pdwEffect = DROPEFFECT_NONE;
82 SWND hHover =
m_pOwner->SwndFromPoint(pt2);
88 if (pPairOld && !pPairNew)
94 if (rcWnd.PtInRect(pt3))
96 pPairOld->m_value->DragOver(grfKeyState, pt, pdwEffect);
102 pPairOld->m_value->DragLeave();
105 pPairNew->m_value->DragEnter(
m_pDataObj, grfKeyState, pt, pdwEffect);
111 pPair->m_value->DragOver(grfKeyState, pt, pdwEffect);
134 pPair->m_value->Drop(pDataObj, grfKeyState, pt, pdwEffect);
146 CPoint pt2(pt.x, pt.y);
147 ScreenToClient(
m_pOwner->GetContainer()->GetHostHwnd(), &pt2);
Drag-and-drop target dispatcher module.
HRESULT DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Handles the DragOver event.
HRESULT Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Handles the Drop event.
HRESULT DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
Handles the DragEnter event.
~SDropTargetDispatcher(void)
Destructor.
POINT PointL2FrameClient(const POINTL &pt)
Converts POINTL to frame client coordinates.
HRESULT QueryInterface(REFIID riid, void **ppvObject)
Queries for a specific interface.
BOOL RegisterDragDrop(SWND swnd, IDropTarget *pDropTarget)
Registers a drag-and-drop target for a window.
void SetOwner(SWindow *pOwner)
Sets the owner window.
BOOL UnregisterDragDrop(SWND swnd)
Unregisters a drag-and-drop target for a window.
HRESULT DragLeave(void)
Handles the DragLeave event.
SDropTargetDispatcher()
Constructor.
Base class for SOUI DUI windows.
void GetWindowRect(LPRECT prect) SCONST OVERRIDE
Retrieves the bounding rectangle of the window.
static SWindow * GetWindow(SWND swnd)
Retrieves the SWindow pointer from a given handle.