@@ -2284,10 +2284,12 @@ INT64 ReBarWindow32SubclassProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPARAM wPar
2284
2284
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
2285
2285
}
2286
2286
2287
+ HMODULE g_hMyTaskbar;
2288
+
2287
2289
HMENU explorer_LoadMenuW(HINSTANCE hInstance, LPCWSTR lpMenuName)
2288
2290
{
2289
2291
HMENU hMenu = LoadMenuW(hInstance, lpMenuName);
2290
- if (hInstance == GetModuleHandle(NULL) && lpMenuName == MAKEINTRESOURCEW(205))
2292
+ if (( hInstance == GetModuleHandle(NULL) || (g_hMyTaskbar && hInstance == g_hMyTaskbar) ) && lpMenuName == MAKEINTRESOURCEW(205))
2291
2293
{
2292
2294
HMENU hSubMenu = GetSubMenu(hMenu, 0);
2293
2295
if (hSubMenu)
@@ -11919,6 +11921,7 @@ HMODULE PrepareAlternateTaskbarImplementation(symbols_addr* symbols_PTRS, const
11919
11921
wprintf(L"[TB] '%s' not found\n", pszTaskbarDll);
11920
11922
return NULL;
11921
11923
}
11924
+ g_hMyTaskbar = hMyTaskbar;
11922
11925
11923
11926
typedef DWORD (*GetVersion_t)();
11924
11927
GetVersion_t GetVersion = (GetVersion_t)GetProcAddress(hMyTaskbar, "GetVersion");
@@ -12609,7 +12612,7 @@ DWORD Inject(BOOL bIsExplorer)
12609
12612
ShouldSystemUseDarkMode = (ShouldSystemUseDarkMode_t)GetProcAddress(hUxtheme, MAKEINTRESOURCEA(138));
12610
12613
if (bOldTaskbar)
12611
12614
{
12612
- VnPatchIAT(hExplorer, "uxtheme.dll", MAKEINTRESOURCEA(138 ), PeopleBand_DrawTextWithGlowHook);
12615
+ VnPatchIAT(hExplorer, "uxtheme.dll", MAKEINTRESOURCEA(126 ), PeopleBand_DrawTextWithGlowHook);
12613
12616
}
12614
12617
// DwmExtendFrameIntoClientArea hooked in LoadSettings
12615
12618
printf("Setup uxtheme functions done\n");
@@ -12807,6 +12810,11 @@ DWORD Inject(BOOL bIsExplorer)
12807
12810
12808
12811
VnPatchIAT(hTwinuiPcshell, "API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL", "RegGetValueW", twinuipcshell_RegGetValueW);
12809
12812
HMODULE hMyTaskbar = PrepareAlternateTaskbarImplementation(&symbols_PTRS, pszTaskbarDll);
12813
+ if (hMyTaskbar)
12814
+ {
12815
+ VnPatchIAT(hMyTaskbar, "user32.dll", "LoadMenuW", explorer_LoadMenuW);
12816
+ VnPatchIAT(hMyTaskbar, "user32.dll", "TrackPopupMenuEx", explorer_TrackPopupMenuExHook);
12817
+ }
12810
12818
printf("Setup twinui.pcshell functions done\n");
12811
12819
12812
12820
0 commit comments