From 40a38f7f9af229068df25dbc538d891942ac4363 Mon Sep 17 00:00:00 2001
From: Aric Stewart <aric@codeweavers.com>
Date: Thu, 15 Feb 2001 21:25:03 +0000
Subject: [PATCH] Continued the implementation of Set Hot Item.

---
 dlls/comctl32/toolbar.c | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c
index c80906b5567..d66fe33ed8e 100644
--- a/dlls/comctl32/toolbar.c
+++ b/dlls/comctl32/toolbar.c
@@ -3367,13 +3367,26 @@ TOOLBAR_SetHotItem (HWND hwnd, WPARAM wParam)
 {
     TOOLBAR_INFO *infoPtr = TOOLBAR_GetInfoPtr(hwnd);
     INT nOldHotItem = infoPtr->nHotItem;
+    TBUTTON_INFO *btnPtr;
 
     if (GetWindowLongA (hwnd, GWL_STYLE) & TBSTYLE_FLAT)
     {
-	infoPtr->nHotItem = (INT)wParam;
-
-	/* FIXME: What else must be done ??? */
 
+    	infoPtr->nHotItem = (INT)wParam;
+        if (wParam >=0)
+        {
+            btnPtr = &infoPtr->buttons[(INT)wParam];
+            btnPtr->bHot = TRUE;
+	        InvalidateRect (hwnd, &btnPtr->rect,
+                    TOOLBAR_HasText(infoPtr, btnPtr));
+        }
+        if (nOldHotItem>=0)
+        {
+            btnPtr = &infoPtr->buttons[nOldHotItem];
+            btnPtr->bHot = FALSE;
+	        InvalidateRect (hwnd, &btnPtr->rect,
+                    TOOLBAR_HasText(infoPtr, btnPtr));
+        }
     }
 
     if (nOldHotItem < 0)
-- 
GitLab