1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-28 01:10:55 +01:00

HideExplorerSearchBar: Fixed on OS builds 22621+

This commit is contained in:
Valentin Radu 2022-08-06 04:39:04 +03:00
parent a90439d096
commit aeeb362045
2 changed files with 8 additions and 12 deletions

View File

@ -103,19 +103,14 @@ LRESULT CALLBACK HideExplorerSearchBarSubClass(
DWORD_PTR dwRefData
)
{
switch (uMsg)
if (uMsg == WM_SIZE || uMsg == WM_PARENTNOTIFY)
{
case WM_PARENTNOTIFY:
if ((WORD)wParam == 1)
{
HideExplorerSearchBar(hWnd);
}
break;
case WM_DESTROY:
RemoveWindowSubclass(hWnd, HideExplorerSearchBarSubClass, (UINT_PTR)HideExplorerSearchBarSubClass);
break;
if (uMsg == WM_SIZE && IsWindows11Version22H2OrHigher()) HideExplorerSearchBar(hWnd);
else if (uMsg == WM_PARENTNOTIFY && (WORD)wParam == 1) HideExplorerSearchBar(hWnd);
}
else if (uMsg == WM_DESTROY)
{
RemoveWindowSubclass(hWnd, HideExplorerSearchBarSubClass, (UINT_PTR)HideExplorerSearchBarSubClass);
}
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
}

View File

@ -3,6 +3,7 @@
#include <Windows.h>
#include <commctrl.h>
#pragma comment(lib, "Comctl32.lib")
#include "osutility.h"
// https://stackoverflow.com/questions/30141592/how-do-i-find-a-handle-inside-a-control
HWND FindChildWindow(