Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aec8c70

Browse files
committed
GUI: Add option for ep_taskbar in Windows 10
1 parent 9f71a5c commit aec8c70

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

ep_gui/GUI.c

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,8 +1171,6 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
11711171
else if (!_stricmp(funcName, "!IsOldTaskbar") && GUI_GetTaskbarStyle(TRUE) != 0) bSkipLines = TRUE;
11721172
else if (!_stricmp(funcName, "IsStockWin10Taskbar") && GUI_GetTaskbarStyle(TRUE) != 1) bSkipLines = TRUE;
11731173
else if (!_stricmp(funcName, "IsAltImplTaskbar") && GUI_GetTaskbarStyle(TRUE) <= 1) bSkipLines = TRUE;
1174-
else if (!_stricmp(funcName, "DoesTaskbarDllExist") && !DoesTaskbarDllExist()) bSkipLines = TRUE;
1175-
else if (!_stricmp(funcName, "!DoesTaskbarDllExist") && DoesTaskbarDllExist()) bSkipLines = TRUE;
11761174
else if (!_stricmp(funcName, "!IsStockWindows10TaskbarAvailable") && !(!IsStockWindows10TaskbarAvailable() && GUI_GetTaskbarStyle(FALSE) == 1)) bSkipLines = TRUE;
11771175
else if (!_stricmp(funcName, "IsWindows10StartMenu") && (!DoesWindows10StartMenuExist() || (dwRes = 0, RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"Start_ShowClassicMode", RRF_RT_DWORD, NULL, &dwRes, &dwSize), (dwRes != 1)))) bSkipLines = TRUE;
11781176
else if (!_stricmp(funcName, "!IsWindows10StartMenu") && (DoesWindows10StartMenuExist() && (dwRes = 0, RegGetValueW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", L"Start_ShowClassicMode", RRF_RT_DWORD, NULL, &dwRes, &dwSize), (dwRes == 1)))) bSkipLines = TRUE;
@@ -2516,7 +2514,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
25162514
bShouldAlterTaskbarDa = TRUE;
25172515
}
25182516
}
2519-
if (!wcscmp(name, L"Virtualized_" _T(EP_CLSID) L"_TaskbarPosition") || !wcscmp(name, L"Virtualized_" _T(EP_CLSID) L"_MMTaskbarPosition"))
2517+
else if (!wcscmp(name, L"Virtualized_" _T(EP_CLSID) L"_TaskbarPosition") || !wcscmp(name, L"Virtualized_" _T(EP_CLSID) L"_MMTaskbarPosition"))
25202518
{
25212519
if (GUI_TaskbarStyle == 0)
25222520
{
@@ -2541,6 +2539,22 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
25412539
RemoveMenu(hMenu, 3, MF_BYCOMMAND);
25422540
}
25432541
}
2542+
else if (!wcscmp(name, L"OldTaskbar"))
2543+
{
2544+
if (!DoesTaskbarDllExist())
2545+
{
2546+
MENUITEMINFOA menuInfo;
2547+
ZeroMemory(&menuInfo, sizeof(MENUITEMINFOA));
2548+
menuInfo.cbSize = sizeof(MENUITEMINFOA);
2549+
menuInfo.fMask = MIIM_DATA;
2550+
GetMenuItemInfoA(hMenu, 3, FALSE, &menuInfo);
2551+
if (menuInfo.dwItemData)
2552+
{
2553+
free(menuInfo.dwItemData);
2554+
}
2555+
RemoveMenu(hMenu, 3, MF_BYCOMMAND);
2556+
}
2557+
}
25442558
HKEY hKey = NULL;
25452559
wchar_t* matchHKLM = wcsstr(section, L"HKEY_LOCAL_MACHINE");
25462560
BOOL bIsHKLM = matchHKLM && (matchHKLM - section) < 3;
@@ -2618,6 +2632,10 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
26182632
{
26192633
GUI_TaskbarStyle = value;
26202634
AdjustTaskbarStyleValue(&GUI_TaskbarStyle);
2635+
if (value >= 2 && !DoesTaskbarDllExist())
2636+
{
2637+
value = 0;
2638+
}
26212639
}
26222640
if (hDC && bInvert)
26232641
{

ep_gui/resources/settings.reg

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,12 @@
55
;q
66

77
;T %R:1001%
8-
;s Taskbar_StyleSection1 DoesTaskbarDllExist
98
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
109
;z 3 %R:1002% *
1110
;x 0 %R:1003%
1211
;x 1 %R:1004%
1312
;x 2 %R:1047%
1413
"OldTaskbar"=dword:00000001
15-
;g Taskbar_StyleSection1
16-
;s Taskbar_StyleSection2 !DoesTaskbarDllExist
17-
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
18-
;z 2 %R:1002% *
19-
;x 0 %R:1003%
20-
;x 1 %R:1004%
21-
"OldTaskbar"=dword:00000001
22-
;g Taskbar_StyleSection2
2314
;s Taskbar_StockWin10Unavailable !IsStockWindows10TaskbarAvailable
2415
;t ⚠ %R:1049%
2516
;g Taskbar_StockWin10Unavailable

ep_gui/resources/settings10.reg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
;T %R:1001%
88
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
9+
;z 2 %R:1002% *
10+
;x 0 %R:1404%
11+
;x 2 %R:1047%
12+
"OldTaskbar"=dword:00000000
913
;y %R:1005% 🡕
1014
;ms-settings:taskbar
1115
;y %R:1006% 🡕
@@ -74,6 +78,10 @@
7478
;x 1 %R:1045%
7579
;x 0 %R:1046%
7680
"TaskbarSmallIcons"=dword:00000000
81+
;s Taskbar_AltImplSection IsAltImplTaskbar
82+
;y %R:1048%
83+
;https://github.com/valinet/ExplorerPatcher/wiki/ExplorerPatcher's-taskbar-implementation
84+
;g Taskbar_AltImplSection
7785

7886
;T %R:1101%
7987
[HKEY_CURRENT_USER\Software\ExplorerPatcher]

0 commit comments

Comments
 (0)