mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +00:00
[SHELL32] Implement support for IID_IDropTarget in CDesktopFolder::GetUIObjectOf and CDrivesFolder::GetUIObjectOf. Fixes dragging items to the icons of My documents, Recycle bin or drive.
svn path=/trunk/; revision=73660
This commit is contained in:
parent
ccf03e4ba8
commit
926c3cfb05
|
@ -686,6 +686,15 @@ HRESULT WINAPI CDesktopFolder::GetUIObjectOf(
|
|||
{
|
||||
hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
|
||||
}
|
||||
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl == 1))
|
||||
{
|
||||
CComPtr<IShellFolder> psfChild;
|
||||
hr = this->BindToObject(apidl[0], NULL, IID_PPV_ARG(IShellFolder, &psfChild));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
return psfChild->CreateViewObject(NULL, riid, ppvOut);
|
||||
}
|
||||
else
|
||||
hr = E_NOINTERFACE;
|
||||
|
||||
|
|
|
@ -631,11 +631,14 @@ HRESULT WINAPI CDrivesFolder::GetUIObjectOf(HWND hwndOwner,
|
|||
else
|
||||
hr = m_regFolder->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, &pObj);
|
||||
}
|
||||
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl >= 1))
|
||||
else if (IsEqualIID (riid, IID_IDropTarget) && (cidl == 1))
|
||||
{
|
||||
IDropTarget * pDt = NULL;
|
||||
hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt));
|
||||
pObj = pDt;
|
||||
CComPtr<IShellFolder> psfChild;
|
||||
hr = this->BindToObject(apidl[0], NULL, IID_PPV_ARG(IShellFolder, &psfChild));
|
||||
if (FAILED_UNEXPECTEDLY(hr))
|
||||
return hr;
|
||||
|
||||
return psfChild->CreateViewObject(NULL, riid, ppvOut);
|
||||
}
|
||||
else
|
||||
hr = E_NOINTERFACE;
|
||||
|
|
Loading…
Reference in a new issue