mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
- was not meant to commited
svn path=/trunk/; revision=30785
This commit is contained in:
parent
4ff1aa5fac
commit
139ec5a366
|
@ -1262,3 +1262,62 @@ SH_EnumerateDynamicContextHandlerForKey(const LPWSTR szFileClass, ItemCmImpl *Th
|
|||
RegCloseKey(hKey);
|
||||
return index;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHCreateDefaultContextMenu [SHELL32.325] Vista API
|
||||
*
|
||||
*/
|
||||
|
||||
HRESULT WINAPI SHCreateDefaultContextMenu(
|
||||
const DEFCONTEXTMENU *pdcm,
|
||||
REFIID riid,
|
||||
void **ppv)
|
||||
{
|
||||
HRESULT hr;
|
||||
IContextMenu2 * pcm;
|
||||
|
||||
if (pdcm->cidl > 0)
|
||||
pcm = ISvItemCm_Constructor( pdcm->psf, pdcm->pidlFolder, pdcm->apidl, pdcm->cidl );
|
||||
else
|
||||
pcm = ISvBgCm_Constructor( pdcm->psf, TRUE );
|
||||
|
||||
hr = S_OK;
|
||||
*ppv = pcm;
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* CDefFolderMenu_Create2 [SHELL32.701]
|
||||
*
|
||||
*/
|
||||
|
||||
INT
|
||||
WINAPI
|
||||
CDefFolderMenu_Create2(
|
||||
LPCITEMIDLIST pidlFolder,
|
||||
HWND hwnd,
|
||||
UINT cidl,
|
||||
LPCITEMIDLIST *apidl,
|
||||
IShellFolder *psf,
|
||||
LPFNDFMCALLBACK lpfn,
|
||||
UINT nKeys,
|
||||
HKEY *ahkeyClsKeys,
|
||||
IContextMenu **ppcm)
|
||||
{
|
||||
DEFCONTEXTMENU pdcm;
|
||||
HRESULT hr;
|
||||
|
||||
pdcm.hwnd = hwnd;
|
||||
pdcm.pcmcb = NULL; //FIXME
|
||||
pdcm.pidlFolder = pidlFolder;
|
||||
pdcm.psf = psf;
|
||||
pdcm.cidl = cidl;
|
||||
pdcm.apidl = apidl;
|
||||
pdcm.punkAssociationInfo = NULL;
|
||||
pdcm.cKeys = nKeys;
|
||||
pdcm.aKeys = ahkeyClsKeys;
|
||||
|
||||
hr = SHCreateDefaultContextMenu(&pdcm, &IID_IContextMenu, (void**)ppcm);
|
||||
return hr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue