Browse Source

HideExplorerSearchBar: Fixed on OS builds 22621+

pull/1138/head
Valentin Radu 3 years ago
parent
commit
aeeb362045
  1. 15
      ExplorerPatcher/HideExplorerSearchBar.c
  2. 1
      ExplorerPatcher/HideExplorerSearchBar.h

15
ExplorerPatcher/HideExplorerSearchBar.c

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

1
ExplorerPatcher/HideExplorerSearchBar.h

@ -3,6 +3,7 @@ @@ -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(

Loading…
Cancel
Save