[EXPLORER][SHELL32][USER32] Implement 'Show the Desktop' action of Task Bar (#668)

The keyboard shortcuts Win+D and Win+M are also enabled.

- Implement IShellDispatch4::ToggleDesktop().
- Implement some commands in CTrayWindow.
- Add "sdk/include/reactos/traycmd.h" for tray commands.
- Fix task window switching.
- Improve the user32!SwitchToThisWindow() function and use it.

CORE-14318, CORE-13157
See also: CORE-14806 and CORE-8723
This commit is contained in:
Katayama Hirofumi MZ 2018-07-13 17:34:42 +09:00 committed by Hermès BÉLUSCA - MAÏTO
parent 706a1c5132
commit 75b09f3f88
33 changed files with 391 additions and 52 deletions

View file

@ -1582,25 +1582,13 @@ public:
if (!bIsMinimized && bIsActive)
{
::PostMessage(TaskItem->hWnd,
WM_SYSCOMMAND,
SC_MINIMIZE,
0);
::ShowWindowAsync(TaskItem->hWnd, SW_MINIMIZE);
TRACE("Valid button clicked. App window Minimized.\n");
}
else
{
if (bIsMinimized)
{
::PostMessage(TaskItem->hWnd,
WM_SYSCOMMAND,
SC_RESTORE,
0);
TRACE("Valid button clicked. App window Restored.\n");
}
SetForegroundWindow(TaskItem->hWnd);
TRACE("Valid button clicked. App window Activated.\n");
::SwitchToThisWindow(TaskItem->hWnd, TRUE);
TRACE("Valid button clicked. App window Restored.\n");
}
}
}