dlls/comctl32/header.c HDN_ITEMCHANGED bug [+fix]

Joerg Wunsch j at uriah.heep.sax.de
Wed Jul 21 14:34:00 CDT 2004


while tracking down a problem with the VMLAB microcontroller
simulation software where two list windows did not resize their
columns when dragging the header separators, together with the help of
the VMLAB developer I noticed that the wrong event is sent back to the
parent window of the header control.

According to MSDN


an HDN_ITEMCHANGED is to be sent in order to tell the attributes /did/
change, but upon ButtonUp, a HDN_ITEMCHANG*ING* used to be sent.

After applying the patch below, VMLAB's header/list boxes now work
under Wine.  (The patch is against rev 1.63 of header.c, which is the
head of CVS by today.)

--- /tmp/header.c.orig	Wed Jul 21 21:27:43 2004
+++ dlls/comctl32/header.c	Wed Jul 21 21:15:50 2004
@@ -1485,7 +1485,7 @@
 	    hdc = GetDC (hwnd);
 	    HEADER_DrawTrackLine (hwnd, hdc, infoPtr->xOldTrack);
             ReleaseDC (hwnd, hdc);
-			if (HEADER_SendHeaderNotify(hwnd, HDN_ITEMCHANGINGA, infoPtr->iMoveItem, HDI_WIDTH))
+			if (HEADER_SendHeaderNotify(hwnd, HDN_ITEMCHANGEDA, infoPtr->iMoveItem, HDI_WIDTH))
 		infoPtr->items[infoPtr->iMoveItem].cxy = infoPtr->nOldWidth;

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

More information about the wine-patches mailing list