Browse Source

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

pull/1080/head
Valentin Radu 4 years ago
parent
commit
72acc4bce0
  1. 17
      ExplorerPatcher/dllmain.c

17
ExplorerPatcher/dllmain.c

@ -8554,6 +8554,19 @@ HMODULE patched_LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlag
#pragma endregion #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) DWORD InjectBasicFunctions(BOOL bIsExplorer, BOOL bInstall)
{ {
//Sleep(150); //Sleep(150);
@ -9130,6 +9143,10 @@ DWORD Inject(BOOL bIsExplorer)
{ {
VnPatchIAT(hExplorer, "USER32.DLL", "DeleteMenu", explorer_DeleteMenu); 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"); HANDLE hShcore = LoadLibraryW(L"shcore.dll");

Loading…
Cancel
Save