Tab widths

Mike Hearn mike at theoretic.com
Sat Mar 8 17:46:06 CST 2003


It's not just height that can be set to the default by passing zero to
TCM_SETITEMSIZE it seems, but also width. This is an undocumented
feature.

thanks -mike
-------------- next part --------------
Index: dlls/comctl32/tab.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tab.c,v
retrieving revision 1.75
diff -u -r1.75 tab.c
--- dlls/comctl32/tab.c	4 Mar 2003 04:34:03 -0000	1.75
+++ dlls/comctl32/tab.c	8 Mar 2003 23:42:12 -0000
@@ -2537,8 +2537,8 @@
   if ((lStyle & TCS_FIXEDWIDTH) || (lStyle & TCS_OWNERDRAWFIXED))
   {
     lResult = MAKELONG(infoPtr->tabWidth, infoPtr->tabHeight);
-    infoPtr->tabWidth = (INT)LOWORD(lParam);
-    /* If requested Height is 0 this means that program wants to use default. */
+    /* UNDOCUMENTED: If requested Width or Height is 0 this means that program wants to use default. */    
+    if (LOWORD(lParam)) infoPtr->tabWidth = (INT)LOWORD(lParam);
     if (HIWORD(lParam)) infoPtr->tabHeight = (INT)HIWORD(lParam);
     TRACE("was h=%d,w=%d, now h=%d,w=%d\n",
 	  HIWORD(lResult), LOWORD(lResult),


More information about the wine-patches mailing list