From 745967b407fb209456b5322badbad2f8528ebee1 Mon Sep 17 00:00:00 2001 From: Jose Carlos Jesus Date: Sun, 25 Jun 2023 21:15:32 -0400 Subject: [PATCH] [BROWSEUI] Fix ToggleBandVisibility in CInternetToolbar CORE-18742 --- dll/win32/browseui/internettoolbar.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dll/win32/browseui/internettoolbar.cpp b/dll/win32/browseui/internettoolbar.cpp index 8d51ad6bcfe..abb309df539 100644 --- a/dll/win32/browseui/internettoolbar.cpp +++ b/dll/win32/browseui/internettoolbar.cpp @@ -1101,6 +1101,19 @@ HRESULT CInternetToolbar::ToggleBandVisibility(int BandID) else bandInfo.fStyle |= RBBS_HIDDEN; + if (BandID == ITBBID_TOOLSBAND) + { + int BtnCount = ::SendMessage(fToolbarWindow, TB_BUTTONCOUNT, 0, 0); + + for (int idx = 0; idx < BtnCount; idx++) + { + TBBUTTONINFO BtnInfo = {sizeof(TBBUTTONINFO), TBIF_BYINDEX | TBIF_STATE}; + ::SendMessage(fToolbarWindow, TB_GETBUTTONINFO, idx, (LPARAM)&BtnInfo); + BtnInfo.fsState = bandInfo.fStyle & RBBS_HIDDEN ? BtnInfo.fsState | TBSTATE_HIDDEN : BtnInfo.fsState & ~TBSTATE_HIDDEN; + ::SendMessage(fToolbarWindow, TB_SETBUTTONINFO, idx, (LPARAM)&BtnInfo); + } + } + SendMessage(fMainReBar, RB_SETBANDINFOW, index, (LPARAM)&bandInfo); ReserveBorderSpace(0); -- 2.36.1.windows.1