https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8fa3c147b6d15eca9e081…
commit 8fa3c147b6d15eca9e081df9dfcb487f723dbd0a
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Sep 7 09:42:43 2020 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Sep 7 09:42:43 2020 +0900
[BROWSEUI][SHELL32] Implement MoveTo/CopyTo buttons (#3128)
Implement the actions of the MoveTo/CopyTo/Delete buttons.
CORE-11132
---
dll/win32/browseui/internettoolbar.cpp | 4 ++++
dll/win32/shell32/CDefaultContextMenu.cpp | 11 +++++++++++
dll/win32/shell32/shresdef.h | 1 +
3 files changed, 16 insertions(+)
diff --git a/dll/win32/browseui/internettoolbar.cpp
b/dll/win32/browseui/internettoolbar.cpp
index d6f6145553d..ea67bd576d5 100644
--- a/dll/win32/browseui/internettoolbar.cpp
+++ b/dll/win32/browseui/internettoolbar.cpp
@@ -1539,6 +1539,10 @@ LRESULT CInternetToolbar::OnForwardToCommandTarget(WORD
wNotifyCode, WORD wID, H
if (fCommandTarget.p != NULL)
{
hResult = fCommandTarget->Exec(&fCommandCategory, wID, 0, NULL, NULL);
+ if (FAILED(hResult))
+ {
+ ::SendMessageW(::GetParent(m_hWnd), WM_COMMAND, wID, 0);
+ }
}
return 1;
}
diff --git a/dll/win32/shell32/CDefaultContextMenu.cpp
b/dll/win32/shell32/CDefaultContextMenu.cpp
index 30d1433df65..d6b0d98d7a8 100644
--- a/dll/win32/shell32/CDefaultContextMenu.cpp
+++ b/dll/win32/shell32/CDefaultContextMenu.cpp
@@ -95,6 +95,7 @@ class CDefaultContextMenu :
HRESULT DoCopyOrCut(LPCMINVOKECOMMANDINFO lpcmi, BOOL bCopy);
HRESULT DoRename(LPCMINVOKECOMMANDINFO lpcmi);
HRESULT DoProperties(LPCMINVOKECOMMANDINFO lpcmi);
+ HRESULT DoUndo(LPCMINVOKECOMMANDINFO lpcmi);
HRESULT DoCreateNewFolder(LPCMINVOKECOMMANDINFO lpici);
HRESULT DoCopyToMoveToFolder(LPCMINVOKECOMMANDINFO lpici, BOOL bCopy);
HRESULT InvokeShellExt(LPCMINVOKECOMMANDINFO lpcmi);
@@ -895,6 +896,13 @@ CDefaultContextMenu::DoProperties(
return S_OK;
}
+HRESULT
+CDefaultContextMenu::DoUndo(LPCMINVOKECOMMANDINFO lpcmi)
+{
+ ERR("TODO: Undo");
+ return E_NOTIMPL;
+}
+
HRESULT
CDefaultContextMenu::DoCopyToMoveToFolder(LPCMINVOKECOMMANDINFO lpici, BOOL bCopy)
{
@@ -1293,6 +1301,9 @@ CDefaultContextMenu::InvokeCommand(
case FCIDM_SHVIEW_MOVETO:
Result = DoCopyToMoveToFolder(&LocalInvokeInfo, FALSE);
break;
+ case FCIDM_SHVIEW_UNDO:
+ Result = DoUndo(&LocalInvokeInfo);
+ break;
default:
Result = E_INVALIDARG;
ERR("Unhandled Verb %xl\n", LOWORD(LocalInvokeInfo.lpVerb));
diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h
index e3be5f4f255..391b8330b2b 100644
--- a/dll/win32/shell32/shresdef.h
+++ b/dll/win32/shell32/shresdef.h
@@ -797,6 +797,7 @@
#define FCIDM_TB_REPORTVIEW 0xA004
#define FCIDM_TB_DESKTOP 0xA005 /* FIXME */
+#define IDM_UNDO (FCIDM_SHVIEW_UNDO - 0x7000)
#define IDM_CUT (FCIDM_SHVIEW_CUT - 0x7000)
#define IDM_COPY (FCIDM_SHVIEW_COPY - 0x7000)
#define IDM_INSERT (FCIDM_SHVIEW_INSERT - 0x7000)