mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 08:17:09 +08:00
[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:
committed by
GitHub
parent
535e262b78
commit
85fdcdf2cc
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user