|
|
|
|
@ -17,7 +17,7 @@ BOOL GetClientRectHook(HWND hWnd, LPRECT lpRect)
@@ -17,7 +17,7 @@ BOOL GetClientRectHook(HWND hWnd, LPRECT lpRect)
|
|
|
|
|
wchar_t wszClassName[100]; |
|
|
|
|
ZeroMemory(wszClassName, 100); |
|
|
|
|
GetClassNameW(hWnd, wszClassName, 100); |
|
|
|
|
if (!wcscmp(wszClassName, L"Shell_TrayWnd") || !wcscmp(wszClassName, L"Shell_SecondaryTrayWnd")) |
|
|
|
|
if (!wcscmp(wszClassName, L"MSTaskListWClass")) |
|
|
|
|
{ |
|
|
|
|
TaskbarCenter_Notify(); |
|
|
|
|
} |
|
|
|
|
@ -26,16 +26,16 @@ BOOL GetClientRectHook(HWND hWnd, LPRECT lpRect)
@@ -26,16 +26,16 @@ BOOL GetClientRectHook(HWND hWnd, LPRECT lpRect)
|
|
|
|
|
|
|
|
|
|
HRESULT TaskbarCenter_Initialize(HMODULE hExplorer) |
|
|
|
|
{ |
|
|
|
|
// This is one of the methods called by explorer!CTaskListWnd::_RecomputeLayout
|
|
|
|
|
if (!VnPatchDelayIAT(hExplorer, "ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll", "GetClientRect", GetClientRectHook)) |
|
|
|
|
if (!(hEvent = CreateEventW(NULL, TRUE, FALSE, TASKBAR_CHANGED_NOTIFICATION))) |
|
|
|
|
{ |
|
|
|
|
return E_NOTIMPL; |
|
|
|
|
} |
|
|
|
|
if (!(hEvent = CreateEventW(NULL, TRUE, FALSE, TASKBAR_CHANGED_NOTIFICATION))) |
|
|
|
|
if (FindWindowExW(NULL, NULL, L"Shell_TrayWnd", NULL)) |
|
|
|
|
{ |
|
|
|
|
return E_NOTIMPL; |
|
|
|
|
} |
|
|
|
|
if (GetLastError() == ERROR_ALREADY_EXISTS) |
|
|
|
|
// This is one of the methods called by explorer!CTaskListWnd::_RecomputeLayout
|
|
|
|
|
if (!VnPatchDelayIAT(hExplorer, "ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll", "GetClientRect", GetClientRectHook)) |
|
|
|
|
{ |
|
|
|
|
return E_NOTIMPL; |
|
|
|
|
} |
|
|
|
|
|