Small tabcontrol improvement

Vitaliy Margolen wine-devel at kievinfo.com
Tue Apr 12 12:56:01 CDT 2005


This been laying around in my tree for some time.

Vitaliy Margolen

changelog:
  dlls/comctl32/tab.c
    Draw only visible tabs
-------------- next part --------------
Index: dlls/comctl32/tab.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/tab.c,v
retrieving revision 1.107
diff -u -p -r1.107 tab.c
--- dlls/comctl32/tab.c	11 Apr 2005 14:21:15 -0000	1.107
+++ dlls/comctl32/tab.c	12 Apr 2005 16:51:37 -0000
@@ -404,7 +404,11 @@ static BOOL TAB_InternalGetItemRect(
     }
   }
 
-  return TRUE;
+  /* Check for visibility */
+  if (lStyle & TCS_VERTICAL)
+    return (itemRect->top < clientRect.bottom) && (itemRect->bottom > clientRect.top);
+  else
+    return (itemRect->left < clientRect.right) && (itemRect->right > clientRect.left);
 }
 
 static inline BOOL


More information about the wine-patches mailing list