Skip to content

Commit

Permalink
Taskbar10: Fix redraw problem on OS builds 22621+
Browse files Browse the repository at this point in the history
  • Loading branch information
valinet committed Aug 6, 2022
1 parent 5ee6e35 commit 7b7cf61
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ExplorerPatcher/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -9451,6 +9451,15 @@ int patched_GetSystemMetrics(int nIndex)
#pragma endregion


#pragma region "Fix Windows 10 taskbar redraw problem on OS builds 22621+"
HWND Windows11v22H2_explorer_CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
if ((*((WORD*)&(lpClassName)+1)) && !wcscmp(lpClassName, L"Shell_TrayWnd")) dwStyle |= WS_CLIPCHILDREN;
return CreateWindowExW(dwExStyle, lpClassName, lpWindowName, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
}
#pragma endregion


DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall)
{
//Sleep(150);
Expand Down Expand Up @@ -10008,6 +10017,7 @@ DWORD Inject(BOOL bIsExplorer)
VnPatchIAT(hExplorer, "user32.dll", "LoadMenuW", explorer_LoadMenuW);
VnPatchIAT(hExplorer, "api-ms-win-core-shlwapi-obsolete-l1-1-0.dll", "QISearch", explorer_QISearch);
if (IsOS(OS_ANYSERVER)) VnPatchIAT(hExplorer, "api-ms-win-shcore-sysinfo-l1-1-0.dll", "IsOS", explorer_IsOS);
if (IsWindows11Version22H2OrHigher()) VnPatchDelayIAT(hExplorer, "ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll", "CreateWindowExW", Windows11v22H2_explorer_CreateWindowExW);
}
VnPatchIAT(hExplorer, "API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL", "RegOpenKeyExW", explorer_RegOpenKeyExW);
VnPatchIAT(hExplorer, "shell32.dll", (LPCSTR)85, explorer_OpenRegStream);
Expand Down

0 comments on commit 7b7cf61

Please sign in to comment.