Author: gadamopoulos
Date: Sat Jul 23 08:42:38 2016
New Revision: 71979
URL:
http://svn.reactos.org/svn/reactos?rev=71979&view=rev
Log:
[SHELL32]
- CDefView: Add the skeleton check that should be used to implement moving items in the
CDefView. Nothing more is implemented because GetKeyState is completely unreliable.
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sat Jul 23 08:42:38 2016
@@ -97,6 +97,7 @@
DWORD m_dwAdvf;
CComPtr<IAdviseSink> m_pAdvSink;
// for drag and drop
+ CComPtr<IDataObject> m_pSourceDataObject;
CComPtr<IDropTarget> m_pCurDropTarget; /* The sub-item, which is
currently dragged over */
CComPtr<IDataObject> m_pCurDataObject; /* The dragged data-object
*/
LONG m_iDragOverItem; /* Dragged over item's index,
iff m_pCurDropTarget != NULL */
@@ -1786,7 +1787,12 @@
}
DWORD dwEffect2;
+
+ m_pSourceDataObject = pda;
+
DoDragDrop(pda, this, dwEffect, &dwEffect2);
+
+ m_pSourceDataObject.Release();
}
}
break;
@@ -2937,7 +2943,23 @@
HRESULT WINAPI CDefView::Drop(IDataObject* pDataObject, DWORD grfKeyState, POINTL pt,
DWORD *pdwEffect)
{
- if (m_pCurDropTarget)
+ ERR("GetKeyState(VK_LBUTTON): %d\n", GetKeyState(VK_LBUTTON));
+
+ if ((m_iDragOverItem == -1) &&
+ (*pdwEffect & DROPEFFECT_MOVE) &&
+ (GetKeyState(VK_LBUTTON) != 0) &&
+ (m_pSourceDataObject.p) &&
+ (SHIsSameObject(pDataObject, m_pSourceDataObject)))
+ {
+ ERR("Should implement moving items here!\n");
+
+ if (m_pCurDropTarget)
+ {
+ m_pCurDropTarget->DragLeave();
+ m_pCurDropTarget.Release();
+ }
+ }
+ else if (m_pCurDropTarget)
{
m_pCurDropTarget->Drop(pDataObject, grfKeyState, pt, pdwEffect);
m_pCurDropTarget.Release();