mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
fixed ShellFolderContextMenu() parameter
svn path=/trunk/; revision=7141
This commit is contained in:
@@ -327,13 +327,21 @@ bool DesktopShellView::DoContextMenu(int x, int y)
|
||||
}
|
||||
|
||||
LPIDA pida = pidList;
|
||||
if (!pida->cidl) {
|
||||
selection->Release();
|
||||
return false;
|
||||
}
|
||||
|
||||
LPCITEMIDLIST parent_pidl = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[0]);
|
||||
LPCITEMIDLIST first_pidl = (LPCITEMIDLIST)((LPBYTE)pida+pida->aoffset[1]);
|
||||
|
||||
LPCITEMIDLIST* apidl = (LPCITEMIDLIST*) alloca(pida->cidl*sizeof(LPCITEMIDLIST));
|
||||
|
||||
for(int i=pida->cidl; i>0; --i)
|
||||
apidl[i-1] = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[i]);
|
||||
|
||||
ShellFolder folder(parent_pidl);
|
||||
|
||||
hr = ShellFolderContextMenu(folder, _hwnd, pida->cidl, &first_pidl, x, y);
|
||||
hr = ShellFolderContextMenu(folder, _hwnd, pida->cidl, apidl, x, y);
|
||||
|
||||
selection->Release();
|
||||
|
||||
|
||||
@@ -219,7 +219,7 @@ int MainFrame::OpenShellFolders(LPIDA pida, HWND hFrameWnd)
|
||||
ShellFolder folder(parent_pidl);
|
||||
|
||||
for(int i=pida->cidl; i>0; --i) {
|
||||
LPCITEMIDLIST pidl = (LPCITEMIDLIST)((LPBYTE)pida+pida->aoffset[i]);
|
||||
LPCITEMIDLIST pidl = (LPCITEMIDLIST) ((LPBYTE)pida+pida->aoffset[i]);
|
||||
|
||||
SFGAOF attribs = SFGAO_FOLDER;
|
||||
HRESULT hr = folder->GetAttributesOf(1, &pidl, &attribs);
|
||||
|
||||
Reference in New Issue
Block a user