Import and merge Wine-20041201 Added: trunk/reactos/lib/comctl32/ Added: trunk/reactos/lib/comctl32/Makefile.ros-template Modified: trunk/reactos/lib/comctl32/comctl32.spec Modified: trunk/reactos/lib/comctl32/commctrl.c Modified: trunk/reactos/lib/comctl32/datetime.c Modified: trunk/reactos/lib/comctl32/listview.c Added: trunk/reactos/lib/comctl32/makefile Modified: trunk/reactos/lib/comctl32/rebar.c Modified: trunk/reactos/lib/comctl32/status.c Modified: trunk/reactos/lib/comctl32/string.c Modified: trunk/reactos/lib/comctl32/tooltips.c Modified: trunk/reactos/lib/comctl32/treeview.c _____
Copied: trunk/reactos/lib/comctl32 (from rev 12466, vendor/wine/dlls/comctl32/current) _____
Added: trunk/reactos/lib/comctl32/Makefile.ros-template --- vendor/wine/dlls/comctl32/current/Makefile.ros-template 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/Makefile.ros-template 2004-12-31 14:19:43 UTC (rev 12470) @@ -0,0 +1,21 @@
+# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ + +TARGET_NAME = comctl32 + +TARGET_OBJECTS = @C_SRCS@ + +TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ + +TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a + +TARGET_BASE = $(TARGET_BASE_LIB_COMCTL32) + +TARGET_RC_SRCS = @RC_SRCS@ +TARGET_RC_BINSRC = @RC_BINSRC@ +TARGET_RC_BINARIES = @RC_BINARIES@ + +default: all + +DEP_OBJECTS = $(TARGET_OBJECTS) + +include $(TOOLS_PATH)/depend.mk _____
Modified: trunk/reactos/lib/comctl32/comctl32.spec --- vendor/wine/dlls/comctl32/current/comctl32.spec 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/comctl32.spec 2004-12-31 14:19:43 UTC (rev 12470) @@ -106,13 +106,13 @@
412 stdcall RemoveWindowSubclass(long ptr long) 413 stdcall DefSubclassProc(long long long long) 414 stdcall -noname MirrorIcon(ptr ptr) -415 stdcall -noname DrawTextWrap(long wstr long ptr long) user32.DrawTextW -416 stdcall -noname DrawTextExPrivWrap(long wstr long ptr long ptr) user32.DrawTextExW -417 stdcall -noname ExtTextOutWrap(long long long long ptr wstr long ptr) gdi32.ExtTextOutW -418 stdcall -noname GetCharWidthWrap(long long long long) gdi32.GetCharWidthW -419 stdcall -noname GetTextExtentPointWrap(long wstr long ptr) gdi32.GetTextExtentPointW -420 stdcall -noname GetTextExtentPoint32Wrap(long wstr long ptr) gdi32.GetTextExtentPoint32W -421 stdcall -noname TextOutWrap(long long long wstr long) gdi32.TextOutW +415 stdcall DrawTextWrap(long wstr long ptr long) user32.DrawTextW +416 stdcall DrawTextExPrivWrap(long wstr long ptr long ptr) user32.DrawTextExW +417 stdcall ExtTextOutWrap(long long long long ptr wstr long ptr) gdi32.ExtTextOutW +418 stdcall GetCharWidthWrap(long long long long) gdi32.GetCharWidthW +419 stdcall GetTextExtentPointWrap(long wstr long ptr) gdi32.GetTextExtentPointW +420 stdcall GetTextExtentPoint32Wrap(long wstr long ptr) gdi32.GetTextExtentPoint32W +421 stdcall TextOutWrap(long long long wstr long) gdi32.TextOutW
# Functions imported by name
_____
Modified: trunk/reactos/lib/comctl32/commctrl.c --- vendor/wine/dlls/comctl32/current/commctrl.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/commctrl.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -482,7 +482,7 @@
r.left += 3; if (style & SBT_RTLREADING) FIXME("Unsupported RTL style!\n"); - DrawTextW (hdc, text, -1, &r, align|DT_VCENTER|DT_SINGLELINE); + DrawTextW (hdc, text, -1, &r, align|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX); SetBkMode(hdc, oldbkmode); } } _____
Modified: trunk/reactos/lib/comctl32/datetime.c --- vendor/wine/dlls/comctl32/current/datetime.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/datetime.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -814,10 +814,10 @@
TRACE("Height=%ld, Width=%ld\n", infoPtr->rcClient.bottom, infoPtr->rcClient.right);
- /* use DrawEdge to adjust the size of rcEdge to get rcDraw */ memcpy((&infoPtr->rcDraw), (&infoPtr->rcClient), sizeof(infoPtr->rcDraw));
- DrawEdge(NULL, &(infoPtr->rcDraw), EDGE_SUNKEN, BF_RECT | BF_ADJUST); + /* subract the size of the edge drawn by DrawEdge */ + InflateRect(&infoPtr->rcDraw, -2, -2);
/* set the size of the button that drops the calendar down */ /* FIXME: account for style that allows button on left side */ _____
Modified: trunk/reactos/lib/comctl32/listview.c --- vendor/wine/dlls/comctl32/current/listview.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/listview.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -146,6 +146,7 @@
#include <assert.h> #include <ctype.h> #include <string.h> +#include <stddef.h> #include <stdlib.h> #include <stdarg.h> #include <stdio.h> @@ -2033,7 +2034,8 @@ infoPtr->iconSize.cy + ICON_BOTTOM_PADDING; Label.right = Label.left + labelSize.cx; Label.bottom = Label.top + infoPtr->nItemHeight; - if (!oversizedBox && labelSize.cy > infoPtr->ntmHeight) + if (!oversizedBox && labelSize.cy > infoPtr->ntmHeight && + infoPtr->ntmHeight) { labelSize.cy = min(Box.bottom - Label.top, labelSize.cy); labelSize.cy /= infoPtr->ntmHeight; @@ -9522,7 +9524,8 @@ hOldFont = SelectObject(hdc, infoPtr->hFont);
/*Get String Length in pixels */ - GetTextExtentPoint32W(hdc, text, lstrlenW(text), &sz); + if(!GetTextExtentPoint32W(hdc, text, lstrlenW(text), &sz)) + sz.cx = 0;
/*Add Extra spacing for the next character */ GetTextMetricsW(hdc, &textMetric); _____
Added: trunk/reactos/lib/comctl32/makefile --- vendor/wine/dlls/comctl32/current/makefile 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/makefile 2004-12-31 14:19:43 UTC (rev 12470) @@ -0,0 +1,9 @@
+# $Id: makefile 7409 2004-01-02 19:49:47Z gvg $ + +PATH_TO_TOP = ../.. + +TARGET_TYPE = winedll + +include $(PATH_TO_TOP)/rules.mak + +include $(TOOLS_PATH)/helper.mk _____
Modified: trunk/reactos/lib/comctl32/rebar.c --- vendor/wine/dlls/comctl32/current/rebar.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/rebar.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -3786,10 +3786,10 @@
infoPtr->bands = NULL; }
- DeleteObject (infoPtr->hcurArrow); - DeleteObject (infoPtr->hcurHorz); - DeleteObject (infoPtr->hcurVert); - DeleteObject (infoPtr->hcurDrag); + DestroyCursor (infoPtr->hcurArrow); + DestroyCursor (infoPtr->hcurHorz); + DestroyCursor (infoPtr->hcurVert); + DestroyCursor (infoPtr->hcurDrag); if(infoPtr->hDefaultFont) DeleteObject (infoPtr->hDefaultFont); SetWindowLongPtrW (infoPtr->hwndSelf, 0, 0);
_____
Modified: trunk/reactos/lib/comctl32/status.c --- vendor/wine/dlls/comctl32/current/status.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/status.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -650,6 +650,7 @@
{ STATUSWINDOWPART *part=NULL; BOOL changed = FALSE; + WORD oldStyle;
if (style & SBT_OWNERDRAW) { TRACE("part %d, text %p\n",nPart,text); @@ -671,6 +672,7 @@ if (part->style != style) changed = TRUE;
+ oldStyle = part->style; part->style = style; if (style & SBT_OWNERDRAW) { if (part->text == text) @@ -694,7 +696,7 @@ /* check if text is unchanged -> no need to redraw */ if (text) { if (!changed && part->text && !lstrcmpW(ntext, part->text)) { - if (!isW) Free(ntext); + Free(ntext); return TRUE; } } else { @@ -702,7 +704,7 @@ return TRUE; }
- if (part->text) + if (part->text && !(oldStyle & SBT_OWNERDRAW)) Free (part->text); part->text = ntext; } _____
Modified: trunk/reactos/lib/comctl32/string.c --- vendor/wine/dlls/comctl32/current/string.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/string.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -264,7 +264,7 @@
{ TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
- return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, strncmpiW); + return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int)) wcsnicmp); }
/*********************************************************************** *** @@ -513,7 +513,7 @@ { TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));
- return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, strncmpW); + return COMCTL32_StrStrHelperW(lpszStr, lpszSearch, (int (*)(LPCWSTR,LPCWSTR,int)) wcsncmp); }
/*********************************************************************** ** _____
Modified: trunk/reactos/lib/comctl32/tooltips.c --- vendor/wine/dlls/comctl32/current/tooltips.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/tooltips.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -2836,7 +2836,7 @@
TOOLTIPS_Unregister (void) { int i; - for (i = 0; i < TTI_ERROR+1; i++) - DeleteObject(hTooltipIcons[i]); + for (i = TTI_INFO; i <= TTI_ERROR; i++) + DestroyIcon(hTooltipIcons[i]); UnregisterClassW (TOOLTIPS_CLASSW, NULL); } _____
Modified: trunk/reactos/lib/comctl32/treeview.c --- vendor/wine/dlls/comctl32/current/treeview.c 2004-12-31 14:18:09 UTC (rev 12466) +++ trunk/reactos/lib/comctl32/treeview.c 2004-12-31 14:19:43 UTC (rev 12470) @@ -2329,7 +2329,7 @@
SelectObject(hdc, hOldPen); DeleteObject(hNewPen);
- if (height < 16 || width < 16) + if (height < 18 || width < 18) { MoveToEx(hdc, centerx - plussize + 1, centery, NULL); LineTo(hdc, centerx + plussize, centery);