From 4f45ba66ddc0813a09025d584e39b1b326f23ff6 Mon Sep 17 00:00:00 2001 From: ggets <4815620+ggets@users.noreply.github.com> Date: Thu, 2 Dec 2021 06:18:51 +0200 Subject: [PATCH] Add ability to toggle Control Center from Wi-Fi Icon (to remove clutter from taskbar's tray icons space) --- ExplorerPatcher/dllmain.c | 15 ++++++++++++++- ExplorerPatcher/settings.reg | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ExplorerPatcher/dllmain.c b/ExplorerPatcher/dllmain.c index 3b0f81d..f81c4c6 100644 --- a/ExplorerPatcher/dllmain.c +++ b/ExplorerPatcher/dllmain.c @@ -567,6 +567,19 @@ void LaunchNetworkTargets(DWORD dwTarget) { InvokeFlyout(INVOKE_FLYOUT_SHOW, INVOKE_FLYOUT_NETWORK); } + else if (dwTarget == 6) + { + InvokeActionCenter(); + return 0; + // ShellExecuteW( + // NULL, + // L"open", + // L"ms-actioncenter:controlcenter/&showFooter=true", + // NULL, + // NULL, + // SW_SHOWNORMAL + // ); + } else if (dwTarget == 5) { ShellExecuteW( @@ -2668,7 +2681,7 @@ HRESULT pnidui_CoCreateInstanceHook( { if (dwVal) { - if (dwVal == 5) + if (dwVal == 5 || dwVal == 6) { if (hCheckForegroundThread) { diff --git a/ExplorerPatcher/settings.reg b/ExplorerPatcher/settings.reg index 68e63cc..eb267d1 100644 --- a/ExplorerPatcher/settings.reg +++ b/ExplorerPatcher/settings.reg @@ -87,7 +87,8 @@ "ReplaceNetwork"=dword:00000000 ;t When clicking a system icon in the tray, open: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network] -;c 6 Network +;c 7 Network +;x 6 Control Center ;x 5 Windows 11 WiFi flyout ;x 0 Windows 10 flyout (default) ;x 2 Windows 8 flyout