https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f156f9a13797ef5cfe1ca…
commit f156f9a13797ef5cfe1ca940f95bf927ee2688a0
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Jan 30 08:01:15 2023 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Mon Jan 30 08:01:15 2023 +0900
[SHELL32] Follow-up of #5008 (8e036fe)
Now the menu item actions on start button should work. CORE-16544
---
dll/win32/shell32/CCopyToMenu.cpp | 4 ++--
dll/win32/shell32/CMoveToMenu.cpp | 4 ++--
dll/win32/shell32/CSendToMenu.cpp | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dll/win32/shell32/CCopyToMenu.cpp b/dll/win32/shell32/CCopyToMenu.cpp
index 2206f968f7a..a692d7fed53 100644
--- a/dll/win32/shell32/CCopyToMenu.cpp
+++ b/dll/win32/shell32/CCopyToMenu.cpp
@@ -272,7 +272,7 @@ CCopyToMenu::QueryContextMenu(HMENU hMenu,
hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
if (uFlags & (CMF_NOVERBS | CMF_VERBSONLY))
- return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst);
m_idCmdFirst = m_idCmdLast = idCmdFirst;
@@ -310,7 +310,7 @@ CCopyToMenu::QueryContextMenu(HMENU hMenu,
++Count;
}
- return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst + Count);
}
HRESULT WINAPI
diff --git a/dll/win32/shell32/CMoveToMenu.cpp b/dll/win32/shell32/CMoveToMenu.cpp
index 2bcb360439b..5087f5ec37d 100644
--- a/dll/win32/shell32/CMoveToMenu.cpp
+++ b/dll/win32/shell32/CMoveToMenu.cpp
@@ -271,7 +271,7 @@ CMoveToMenu::QueryContextMenu(HMENU hMenu,
hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
if (uFlags & (CMF_NOVERBS | CMF_VERBSONLY))
- return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst);
m_idCmdFirst = m_idCmdLast = idCmdFirst;
@@ -314,7 +314,7 @@ CMoveToMenu::QueryContextMenu(HMENU hMenu,
++Count;
}
- return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Count);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst + Count);
}
HRESULT WINAPI
diff --git a/dll/win32/shell32/CSendToMenu.cpp b/dll/win32/shell32/CSendToMenu.cpp
index 41db2e13d1f..131f21e2a0a 100644
--- a/dll/win32/shell32/CSendToMenu.cpp
+++ b/dll/win32/shell32/CSendToMenu.cpp
@@ -296,7 +296,7 @@ CSendToMenu::QueryContextMenu(HMENU hMenu,
hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
if (uFlags & (CMF_NOVERBS | CMF_VERBSONLY))
- return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst);
HMENU hSubMenu = CreateMenu();
if (!hSubMenu)
@@ -327,7 +327,7 @@ CSendToMenu::QueryContextMenu(HMENU hMenu,
m_hSubMenu = hSubMenu;
DestroyMenu(hOldSubMenu);
- return MAKE_HRESULT(SEVERITY_SUCCESS, 0, cItems);
+ return MAKE_HRESULT(SEVERITY_SUCCESS, 0, idCmdFirst + cItems);
}
STDMETHODIMP