Toolbar SetHotItem

Aric Stewart aric at codeweavers.com
Thu Feb 15 11:36:22 CST 2001


This continues the implementation of Set Hot Item.

-aric
-------------- next part --------------
Index: dlls/comctl32/toolbar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.78
diff -u -u -r1.78 toolbar.c
--- dlls/comctl32/toolbar.c	2001/02/14 21:42:10	1.78
+++ dlls/comctl32/toolbar.c	2001/02/15 17:21:57
@@ -3367,13 +3367,26 @@
 {
     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)


More information about the wine-patches mailing list