comctl32:Header minor fixes

Vitaliy Margolen wine-patch at kievinfo.com
Sun Sep 12 15:24:42 CDT 2004


This makes The Bat! happy.

Vitaliy Margolen

changelog:
  dlls/comctl32/header.c
  Send correct tracing notification messages
-------------- next part --------------
Index: dlls/comctl32/header.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/header.c,v
retrieving revision 1.65
diff -u -r1.65 header.c
--- dlls/comctl32/header.c	2 Sep 2004 23:00:53 -0000	1.65
+++ dlls/comctl32/header.c	12 Sep 2004 19:55:32 -0000
@@ -859,10 +859,10 @@
 
     HEADER_InternalHitTest (hwnd, &phti->pt, &phti->flags, &phti->iItem);
 
-    if (phti->flags == HHT_ONHEADER)
-        return phti->iItem;
-    else
+    if (phti->flags == HHT_NOWHERE)
         return -1;
+    else
+        return phti->iItem;
 }
 
 
@@ -1501,9 +1501,9 @@
 		infoPtr->items[infoPtr->iMoveItem].cxy = nWidth;
             }
 
-			HEADER_SendHeaderNotify(hwnd, HDN_ITEMCHANGINGA, infoPtr->iMoveItem, HDI_WIDTH);
 	    HEADER_SetItemBounds (hwnd);
-	    InvalidateRect(hwnd, NULL, FALSE);
+	    InvalidateRect(hwnd, NULL, TRUE);
+	    HEADER_SendHeaderNotify(hwnd, HDN_ITEMCHANGEDA, infoPtr->iMoveItem, HDI_WIDTH);
        /*
 	* }
         */
@@ -1576,7 +1576,7 @@
 	}
 	else if (infoPtr->bTracking) {
 	    if (dwStyle & HDS_FULLDRAG) {
-		if (HEADER_SendHeaderNotify (hwnd, HDN_ITEMCHANGINGA, infoPtr->iMoveItem, HDI_WIDTH))
+		if (HEADER_SendHeaderNotify (hwnd, HDN_TRACKA, infoPtr->iMoveItem, HDI_WIDTH))
 		{
 		nWidth = pt.x - infoPtr->items[infoPtr->iMoveItem].rect.left + infoPtr->xTrackOffset;
 		if (nWidth < 0)
@@ -1585,7 +1585,6 @@
 			HEADER_SendHeaderNotify(hwnd, HDN_ITEMCHANGEDA, infoPtr->iMoveItem, HDI_WIDTH);
 		}
 		HEADER_SetItemBounds (hwnd);
-		InvalidateRect(hwnd, NULL, FALSE);
 	    }
 	    else {
 		hdc = GetDC (hwnd);


More information about the wine-patches mailing list