[SHELL32] Implement Copy To Folder (retrial) (#3044)

- Add context menu item "Copy to &folder..." and implement the action.
- Implement the "Copy to &folder..." menu item of "Edit" menu of Explorer.
CORE-11132
This commit is contained in:
Katayama Hirofumi MZ 2020-08-16 08:04:07 +09:00 committed by GitHub
parent 535e262b78
commit 85fdcdf2cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 659 additions and 1 deletions

View file

@ -1822,6 +1822,7 @@ LRESULT CDefView::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHand
case FCIDM_SHVIEW_COPY:
case FCIDM_SHVIEW_RENAME:
case FCIDM_SHVIEW_PROPERTIES:
case FCIDM_SHVIEW_COPYTO:
return OnExplorerCommand(dwCmdID, TRUE);
case FCIDM_SHVIEW_INSERT:
@ -2295,6 +2296,26 @@ LRESULT CDefView::OnInitMenuPopup(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL
HMENU hViewMenu = GetSubmenuByID(m_hMenu, FCIDM_MENU_VIEW);
if (GetSelections() == 0)
{
::EnableMenuItem(hmenu, FCIDM_SHVIEW_CUT, MF_GRAYED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_COPY, MF_GRAYED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_RENAME, MF_GRAYED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_COPYTO, MF_GRAYED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_MOVETO, MF_GRAYED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_DELETE, MF_GRAYED);
}
else
{
// FIXME: Check copyable
::EnableMenuItem(hmenu, FCIDM_SHVIEW_CUT, MF_ENABLED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_COPY, MF_ENABLED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_RENAME, MF_ENABLED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_COPYTO, MF_ENABLED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_MOVETO, MF_ENABLED);
::EnableMenuItem(hmenu, FCIDM_SHVIEW_DELETE, MF_ENABLED);
}
/* Lets try to find out what the hell wParam is */
if (hmenu == GetSubMenu(m_hMenu, nPos))
menuItemId = ReallyGetMenuItemID(m_hMenu, nPos);