[1/4] shell32: fix context menu creation
Daniel Jeliński
djelinski1 at gmail.com
Sat Aug 10 16:24:45 CDT 2013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20130810/a5e79b86/attachment.html>
-------------- next part --------------
From 46e29327a67035a776756df7d412b232c411f3de Mon Sep 17 00:00:00 2001
From: Daniel Jelinski <djelinski1 at gmail.com>
Date: Sat, 10 Aug 2013 18:53:29 +0200
Subject: shell32: fix context menu creation
MergeMenu changes menu item IDs. This change has to be taken into account when removing Explore.
Also when adding new Explore, text should also be set.
---
dlls/shell32/shlview_cmenu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
index 92f671a..07c33d0 100644
--- a/dlls/shell32/shlview_cmenu.c
+++ b/dlls/shell32/shlview_cmenu.c
@@ -160,10 +160,10 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
mi.dwTypeData = str;
mi.cch = 255;
GetMenuItemInfoW(hmenu, FCIDM_SHVIEW_EXPLORE, MF_BYCOMMAND, &mi);
- RemoveMenu(hmenu, FCIDM_SHVIEW_EXPLORE, MF_BYCOMMAND);
+ RemoveMenu(hmenu, FCIDM_SHVIEW_EXPLORE + idCmdFirst, MF_BYCOMMAND);
mi.cbSize = sizeof(mi);
- mi.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE;
+ mi.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | MIIM_STRING;
mi.dwTypeData = str;
mi.fState = MFS_ENABLED;
mi.wID = FCIDM_SHVIEW_EXPLORE;
--
1.8.1.2
More information about the wine-patches
mailing list