1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-15 03:27:35 +01:00

Taskbar10: Fix taskbar button thumbnails in newer OS builds (22572+)

This commit is contained in:
Valentin Radu 2022-03-14 22:44:28 +02:00
parent 0d956cb122
commit 72acc4bce0

View File

@ -8554,6 +8554,19 @@ HMODULE patched_LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlag
#pragma endregion
#pragma region "Fix taskbar thumbnails in newer builds (22572+)"
HRESULT explorer_DwmUpdateThumbnailPropertiesHook(HTHUMBNAIL hThumbnailId, DWM_THUMBNAIL_PROPERTIES* ptnProperties)
{
if (ptnProperties->dwFlags == 0 || ptnProperties->dwFlags == DWM_TNP_RECTSOURCE)
{
ptnProperties->dwFlags |= DWM_TNP_SOURCECLIENTAREAONLY;
ptnProperties->fSourceClientAreaOnly = TRUE;
}
return DwmUpdateThumbnailProperties(hThumbnailId, ptnProperties);
}
#pragma endregion
DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall)
{
//Sleep(150);
@ -9130,6 +9143,10 @@ DWORD Inject(BOOL bIsExplorer)
{
VnPatchIAT(hExplorer, "USER32.DLL", "DeleteMenu", explorer_DeleteMenu);
}
if (bOldTaskbar && global_rovi.dwBuildNumber >= 22572)
{
VnPatchIAT(hExplorer, "dwmapi.dll", "DwmUpdateThumbnailProperties", explorer_DwmUpdateThumbnailPropertiesHook);
}
HANDLE hShcore = LoadLibraryW(L"shcore.dll");