PATCH: Status control (comctl32)

Sander van Leeuwen sandervl at xs4all.nl
Wed May 29 11:04:15 CDT 2002


Changelog:
- check for valid part nr in STATUSBAR_GetTextLength
- TRACE fix in STATUSBAR_SetTextT; SBT_OWNERDRAW pointer
   isn't always a string pointer.

Author: Sander van Leeuwen/Odin (sandervl at xs4all.nl)


--- status.c	Mon May 27 12:14:14 2002
+++ status.cn	Wed May 29 17:57:26 2002
@@ -426,6 +426,10 @@
     DWORD result;
 
     TRACE("part %d\n", nPart);
+
+    /* MSDN says: "simple parts use index of 0", so this check is ok. */
+    if (nPart < 0 || nPart >= infoPtr->numParts) return 0;
+
     if (infoPtr->simple)
 	part = &infoPtr->part0;
     else
@@ -627,7 +631,10 @@
     STATUSWINDOWPART *part=NULL;
     BOOL changed = FALSE;
 
-    TRACE("part %d, text %s\n", nPart, debugstr_t(text, isW));
+    if (style & SBT_OWNERDRAW) {    
+         TRACE("part %d, text %x\n",nPart,text);
+    }
+    else TRACE("part %d, text %s\n", nPart, debugstr_t(text, isW));
 
     /* MSDN says: "If the parameter is set to SB_SIMPLEID (255), the status
      * window is assumed to be a simple window */





More information about the wine-patches mailing list