mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 09:50:07 +00:00
[SHELL32]
* Move shlmenu.cpp to the wine folder. * Convert shlmenu.cpp into shlmenu.c. svn path=/branches/shell-experiments/; revision=65283
This commit is contained in:
parent
2aebe831cb
commit
ad2ed830be
|
@ -55,7 +55,6 @@ list(APPEND SOURCE
|
|||
shlfileop.cpp
|
||||
shlfolder.cpp
|
||||
CFileSysBindData.cpp
|
||||
shlmenu.cpp
|
||||
CDefView.cpp
|
||||
stubs.cpp
|
||||
systray.cpp
|
||||
|
@ -76,6 +75,7 @@ add_library(shell32 SHARED
|
|||
wine/shellpath.c
|
||||
wine/shellreg.c
|
||||
wine/shellstring.c
|
||||
wine/shlmenu.c
|
||||
wine/shpolicy.c
|
||||
vista.c
|
||||
shell32.rc
|
||||
|
|
|
@ -18,7 +18,20 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#define WIN32_NO_STATUS
|
||||
#define _INC_WINDOWS
|
||||
#define COBJMACROS
|
||||
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <shlobj.h>
|
||||
#include <undocshell.h>
|
||||
#include <shlwapi.h>
|
||||
#include <wine/debug.h>
|
||||
#include <wine/unicode.h>
|
||||
|
||||
#include "pidl.h"
|
||||
#include "shell32_main.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(shellmenu);
|
||||
|
||||
|
@ -115,8 +128,8 @@ static LPFMINFO FM_SetMenuParameter(
|
|||
*/
|
||||
static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl)
|
||||
{
|
||||
CComPtr<IShellFolder> lpsf;
|
||||
CComPtr<IShellFolder> lpsf2;
|
||||
IShellFolder *lpsf;
|
||||
IShellFolder *lpsf2;
|
||||
ULONG ulItemAttr = SFGAO_FOLDER;
|
||||
UINT uID, uEnumFlags;
|
||||
LPFNFMCALLBACK lpfnCallback;
|
||||
|
@ -158,19 +171,19 @@ static int FM_InitMenuPopup(HMENU hmenu, LPCITEMIDLIST pAlternatePidl)
|
|||
|
||||
if (SUCCEEDED(SHGetDesktopFolder(&lpsf)))
|
||||
{
|
||||
if (SUCCEEDED(lpsf->BindToObject(pidl, 0, IID_PPV_ARG(IShellFolder, &lpsf2))))
|
||||
if (SUCCEEDED(IShellFolder_BindToObject(lpsf, pidl,0,&IID_IShellFolder,(LPVOID *)&lpsf2)))
|
||||
{
|
||||
CComPtr<IEnumIDList> lpe;
|
||||
IEnumIDList *lpe;
|
||||
|
||||
if (SUCCEEDED(lpsf2->EnumObjects(0, uEnumFlags, &lpe)))
|
||||
if (SUCCEEDED (IShellFolder_EnumObjects(lpsf2, 0, uEnumFlags, &lpe )))
|
||||
{
|
||||
|
||||
LPITEMIDLIST pidlTemp = NULL;
|
||||
ULONG ulFetched;
|
||||
|
||||
while ((!bAbortInit) && (S_OK == lpe->Next(1, &pidlTemp, &ulFetched)))
|
||||
while ((!bAbortInit) && (S_OK == IEnumIDList_Next(lpe,1,&pidlTemp,&ulFetched)))
|
||||
{
|
||||
if (SUCCEEDED(lpsf->GetAttributesOf(1, (LPCITEMIDLIST*) &pidlTemp, &ulItemAttr)))
|
||||
if (SUCCEEDED (IShellFolder_GetAttributesOf(lpsf, 1, (LPCITEMIDLIST*)&pidlTemp, &ulItemAttr)))
|
||||
{
|
||||
ILGetDisplayNameExW(NULL, pidlTemp, sTemp, ILGDN_FORPARSING);
|
||||
if (!(PidlToSicIndex(lpsf, pidlTemp, FALSE, 0, &iIcon)))
|
Loading…
Reference in a new issue