From 6d0e0e250c55a2e7dddc44b3e9cea9d9cdd6c205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sat, 14 Aug 2004 19:12:35 +0000 Subject: [PATCH] Sync to Wine-20040813: Jon Griffiths - Make pattern brush data const. Mike McCormack - Prevent listview from crashing when a null sort function is passed to LVM_SORTITEMS. Filip Navara - Don't update infoPtr->dwStyle in LISTVIEW_WindowProc. It's already handled in LISTVIEW_StyleChanged and LISTVIEW_Create processing. - Ignore WS_VSCROLL/WS_HSCROLL flags in infoPtr->dwStyle because they're not always up-to-date. - Use correct dialog title for Wizard 97 and correctly display header bitmap for old-style Wizard 97. - Fix TOOLBAR_DrawMasked to correctly use image list mask. Eric Kohl - Move watermark and header bitmap loading code from PROPSHEET_CreatePage into its own function PROPSHEET_LoadWizardBitmaps and call this function from property sheet's dialog procedure. Thomas Weidenmueller - Correct tooltips behavior. svn path=/trunk/; revision=10532 --- reactos/lib/comctl32/imagelist.c | 4 +- reactos/lib/comctl32/listview.c | 20 ++--- reactos/lib/comctl32/propsheet.c | 117 ++++++++++++++++++++------ reactos/lib/comctl32/toolbar.c | 7 +- reactos/lib/comctl32/tooltips.c | 106 +++++++++++++++++++++-- reactos/lib/comctl32/winehq2ros.patch | 18 ++-- 6 files changed, 208 insertions(+), 64 deletions(-) diff --git a/reactos/lib/comctl32/imagelist.c b/reactos/lib/comctl32/imagelist.c index d0fff569d6f..579de3ffe1a 100644 --- a/reactos/lib/comctl32/imagelist.c +++ b/reactos/lib/comctl32/imagelist.c @@ -554,10 +554,10 @@ ImageList_Create (INT cx, INT cy, UINT flags, INT nCount; HBITMAP hbmTemp; UINT ilc = (flags & 0xFE); - static WORD aBitBlend25[] = + static const WORD aBitBlend25[] = {0xAA, 0x00, 0x55, 0x00, 0xAA, 0x00, 0x55, 0x00}; - static WORD aBitBlend50[] = + static const WORD aBitBlend50[] = {0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA}; TRACE("(%d %d 0x%x %d %d)\n", cx, cy, flags, cInitial, cGrow); diff --git a/reactos/lib/comctl32/listview.c b/reactos/lib/comctl32/listview.c index b9e23413e5e..704988b2b2b 100644 --- a/reactos/lib/comctl32/listview.c +++ b/reactos/lib/comctl32/listview.c @@ -117,7 +117,6 @@ * -- LVM_GETISEARCHSTRINGW, LVM_GETISEARCHSTRINGA * -- LVM_GETTILEINFO, LVM_SETTILEINFO * -- LVM_GETTILEVIEWINFO, LVM_SETTILEVIEWINFO - * -- LVM_GETTOOLTIPS, LVM_SETTOOLTIPS * -- LVM_GETUNICODEFORMAT, LVM_SETUNICODEFORMAT * -- LVM_GETVIEW, LVM_SETVIEW * -- LVM_GETWORKAREAS, LVM_SETWORKAREAS @@ -3487,7 +3486,6 @@ static BOOL LISTVIEW_SetItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, B */ static INT LISTVIEW_GetTopIndex(LISTVIEW_INFO *infoPtr) { - LONG lStyle = infoPtr->dwStyle; UINT uView = infoPtr->dwStyle & LVS_TYPEMASK; INT nItem = 0; SCROLLINFO scrollInfo; @@ -3497,17 +3495,17 @@ static INT LISTVIEW_GetTopIndex(LISTVIEW_INFO *infoPtr) if (uView == LVS_LIST) { - if ((lStyle & WS_HSCROLL) && GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo)) + if (GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo)) nItem = scrollInfo.nPos * LISTVIEW_GetCountPerColumn(infoPtr); } else if (uView == LVS_REPORT) { - if ((lStyle & WS_VSCROLL) && GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) + if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) nItem = scrollInfo.nPos; } else { - if ((lStyle & WS_VSCROLL) && GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) + if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) nItem = LISTVIEW_GetCountPerRow(infoPtr) * (scrollInfo.nPos / infoPtr->nItemHeight); } @@ -5831,9 +5829,9 @@ static void LISTVIEW_GetOrigin(LISTVIEW_INFO *infoPtr, LPPOINT lpptOrigin) scrollInfo.cbSize = sizeof(SCROLLINFO); scrollInfo.fMask = SIF_POS; - if ((infoPtr->dwStyle & WS_HSCROLL) && GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo)) + if (GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo)) nHorzPos = scrollInfo.nPos; - if ((infoPtr->dwStyle & WS_VSCROLL) && GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) + if (GetScrollInfo(infoPtr->hwndSelf, SB_VERT, &scrollInfo)) nVertPos = scrollInfo.nPos; TRACE("nHorzPos=%d, nVertPos=%d\n", nHorzPos, nVertPos); @@ -7276,6 +7274,7 @@ static BOOL LISTVIEW_SortItems(LISTVIEW_INFO *infoPtr, PFNLVCOMPARE pfnCompare, if (infoPtr->dwStyle & LVS_OWNERDATA) return FALSE; + if (!pfnCompare) return FALSE; if (!infoPtr->hdpaItems) return FALSE; /* if there are 0 or 1 items, there is no need to sort */ @@ -8652,7 +8651,7 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr) * The "2" is there to mimic the native control. I think it may be * related to either padding or edges. (GLA 7/2002) */ - if (!(infoPtr->dwStyle & WS_HSCROLL)) + if (!(GetWindowLongW(infoPtr->hwndSelf, GWL_STYLE) & WS_HSCROLL)) infoPtr->rcList.bottom -= GetSystemMetrics(SM_CYHSCROLL); infoPtr->rcList.bottom = max (infoPtr->rcList.bottom - 2, 0); } @@ -8782,11 +8781,6 @@ LISTVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (!infoPtr && (uMsg != WM_CREATE)) return DefWindowProcW(hwnd, uMsg, wParam, lParam); - if (infoPtr) - { - infoPtr->dwStyle = GetWindowLongW(hwnd, GWL_STYLE); - } - switch (uMsg) { case LVM_APPROXIMATEVIEWRECT: diff --git a/reactos/lib/comctl32/propsheet.c b/reactos/lib/comctl32/propsheet.c index a52b9ace329..0b04787f878 100644 --- a/reactos/lib/comctl32/propsheet.c +++ b/reactos/lib/comctl32/propsheet.c @@ -1529,29 +1529,19 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent, (DWORD)hwndPage, rc.left, rc.top, rc.right, rc.bottom, pageWidth, pageHeight, padding.x, padding.y); - /* If there is a watermark, offset the dialog items */ - if ( (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_WIZARD97_OLD)) && - (psInfo->ppshheader.dwFlags & PSH_WATERMARK) && - ((index == 0) || (index == psInfo->nPages - 1)) ) - { - /* if PSH_USEHBMWATERMARK is not set, load the resource from pszbmWatermark - and put the HBITMAP in hbmWatermark. Thus all the rest of the code always - considers hbmWatermark as valid. */ - if (!(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK)) - { - ((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark = - CreateMappedBitmap(ppshpage->hInstance, (INT)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0); - } - } - if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_WIZARD97_OLD) && psInfo->ppshheader.dwFlags & PSH_HEADER) { - /* Same behavior as for watermarks */ - if (!(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)) + if ((ppshpage->dwFlags & PSP_USEHEADERTITLE) && + (HIWORD(ppshpage->pszHeaderTitle) == 0)) { - ((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader = - CreateMappedBitmap(ppshpage->hInstance, (INT)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0); + /* FIXME: load title string into ppshpage->pszHeaderTitle */ + } + + if ((ppshpage->dwFlags & PSP_USEHEADERSUBTITLE) && + (HIWORD(ppshpage->pszHeaderSubTitle) == 0)) + { + /* FIXME: load title string into ppshpage->pszHeaderSubTitle */ } hwndChild = GetDlgItem(hwndParent, IDC_SUNKEN_LINEHEADER); @@ -1585,6 +1575,36 @@ static BOOL PROPSHEET_CreatePage(HWND hwndParent, return TRUE; } +/****************************************************************************** + * PROPSHEET_LoadWizardBitmaps + * + * Loads the watermark and header bitmaps for a wizard. + */ +static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo) +{ + if (psInfo->ppshheader.dwFlags & (PSH_WIZARD97_NEW | PSH_WIZARD97_OLD)) + { + /* if PSH_USEHBMWATERMARK is not set, load the resource from pszbmWatermark + and put the HBITMAP in hbmWatermark. Thus all the rest of the code always + considers hbmWatermark as valid. */ + if ((psInfo->ppshheader.dwFlags & PSH_WATERMARK) && + !(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK)) + { + ((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark = + CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0); + } + + /* Same behavior as for watermarks */ + if ((psInfo->ppshheader.dwFlags & PSH_HEADER) && + !(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)) + { + ((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader = + CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0); + } + } +} + + /****************************************************************************** * PROPSHEET_ShowPage * @@ -1610,8 +1630,11 @@ static BOOL PROPSHEET_ShowPage(HWND hwndDlg, int index, PropSheetInfo * psInfo) PROPSHEET_CreatePage(hwndDlg, index, psInfo, ppshpage); } - PROPSHEET_SetTitleW(hwndDlg, psInfo->ppshheader.dwFlags, - psInfo->proppage[index].pszText); + if ((psInfo->ppshheader.dwFlags & (PSH_WIZARD97_OLD | PSH_WIZARD97_NEW)) == 0) + { + PROPSHEET_SetTitleW(hwndDlg, psInfo->ppshheader.dwFlags, + psInfo->proppage[index].pszText); + } if (psInfo->active_page != -1) ShowWindow(psInfo->proppage[psInfo->active_page].hwndPage, SW_HIDE); @@ -3055,12 +3078,39 @@ static LRESULT PROPSHEET_Paint(HWND hwnd) GetClientRect(hwndLineHeader, &r); MapWindowPoints(hwndLineHeader, hwnd, (LPPOINT) &r, 2); SetRect(&rzone, 0, 0, r.right, r.top - 1); - hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0)); - FillRect(hdc, &rzone, hbr); - DeleteObject(hbr); GetObjectA(psInfo->ppshheader.u5.hbmHeader, sizeof(BITMAP), (LPVOID)&bm); + if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD) + { + /* Fill the unoccupied part of the header with color of the + * left-top pixel, but do it only when needed. + */ + if (bm.bmWidth < r.right || bm.bmHeight < r.bottom) + { + hbr = CreateSolidBrush(GetPixel(hdcSrc, 0, 0)); + CopyRect(&r, &rzone); + if (bm.bmWidth < r.right) + { + r.left = bm.bmWidth; + FillRect(hdc, &r, hbr); + } + if (bm.bmHeight < r.bottom) + { + r.left = 0; + r.top = bm.bmHeight; + FillRect(hdc, &r, hbr); + } + DeleteObject(hbr); + } + } + else + { + hbr = CreateSolidBrush(GetSysColor(COLOR_WINDOW)); + FillRect(hdc, &rzone, hbr); + DeleteObject(hbr); + } + clrOld = SetTextColor (hdc, 0x00000000); oldBkMode = SetBkMode (hdc, TRANSPARENT); @@ -3085,9 +3135,20 @@ static LRESULT PROPSHEET_Paint(HWND hwnd) -1, &r, DT_LEFT | DT_SINGLELINE); } - BitBlt(hdc, rzone.right - bm.bmWidth, (rzone.bottom - bm.bmHeight)/2, - bm.bmWidth, bm.bmHeight, - hdcSrc, 0, 0, SRCCOPY); + if (psInfo->ppshheader.dwFlags & PSH_WIZARD97_OLD) + { + BitBlt(hdc, 0, 0, + bm.bmWidth, min(bm.bmHeight, rzone.bottom), + hdcSrc, 0, 0, SRCCOPY); + } + else + { + BitBlt(hdc, rzone.right - bm.bmWidth, + (rzone.bottom - bm.bmHeight) / 2, + bm.bmWidth, bm.bmHeight, + hdcSrc, 0, 0, SRCCOPY); + } + offsety = rzone.bottom + 2; SetTextColor(hdc, clrOld); @@ -3210,6 +3271,8 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) PROPSHEET_CreateTabControl(hwnd, psInfo); + PROPSHEET_LoadWizardBitmaps(psInfo); + if (psInfo->ppshheader.dwFlags & INTRNL_ANY_WIZARD) { ShowWindow(hwndTabCtrl, SW_HIDE); diff --git a/reactos/lib/comctl32/toolbar.c b/reactos/lib/comctl32/toolbar.c index ac1205212c4..e77e59aeaa3 100644 --- a/reactos/lib/comctl32/toolbar.c +++ b/reactos/lib/comctl32/toolbar.c @@ -654,8 +654,7 @@ static void TOOLBAR_DrawMasked(HIMAGELIST himl, int index, HDC hdc, INT x, INT y /* Create src image */ hdcImage = CreateCompatibleDC(hdc); - hbmImage = CreateBitmap(cx, cy, GetDeviceCaps(hdc,PLANES), - GetDeviceCaps(hdc,BITSPIXEL), NULL); + hbmImage = CreateCompatibleBitmap(hdc, cx, cy); SelectObject(hdcImage, hbmImage); ImageList_DrawEx(himl, index, hdcImage, 0, 0, cx, cy, RGB(0xff, 0xff, 0xff), RGB(0,0,0), draw_flags); @@ -666,8 +665,8 @@ static void TOOLBAR_DrawMasked(HIMAGELIST himl, int index, HDC hdc, INT x, INT y SelectObject(hdcMask, hbmMask); /* Remove the background and all white pixels */ - SetBkColor(hdcImage, ImageList_GetBkColor(himl)); - BitBlt(hdcMask, 0, 0, cx, cy, hdcImage, 0, 0, SRCCOPY); + ImageList_DrawEx(himl, index, hdcMask, 0, 0, cx, cy, + RGB(0xff, 0xff, 0xff), RGB(0,0,0), ILD_MASK); SetBkColor(hdcImage, RGB(0xff, 0xff, 0xff)); BitBlt(hdcMask, 0, 0, cx, cy, hdcImage, 0, 0, NOTSRCERASE); diff --git a/reactos/lib/comctl32/tooltips.c b/reactos/lib/comctl32/tooltips.c index a88e50fde3a..dd20b138903 100644 --- a/reactos/lib/comctl32/tooltips.c +++ b/reactos/lib/comctl32/tooltips.c @@ -119,6 +119,7 @@ typedef struct INT nAutoPopTime; INT nInitialTime; RECT rcMargin; + BOOL bToolBelow; TTTOOL_INFO *tools; } TOOLTIPS_INFO; @@ -132,10 +133,13 @@ typedef struct /* offsets from window edge to start of text */ #define NORMAL_TEXT_MARGIN 2 -#define BALLOON_TEXT_MARGIN (NORMAL_TEXT_MARGIN+10) +#define BALLOON_TEXT_MARGIN (NORMAL_TEXT_MARGIN+8) /* value used for CreateRoundRectRgn that specifies how much * each corner is curved */ #define BALLOON_ROUNDEDNESS 20 +#define BALLOON_STEMHEIGHT 13 +#define BALLOON_STEMWIDTH 10 +#define BALLOON_STEMINDENT 20 LRESULT CALLBACK TOOLTIPS_SubclassProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, UINT_PTR uId, DWORD_PTR dwRef); @@ -178,6 +182,7 @@ TOOLTIPS_Refresh (HWND hwnd, HDC hdc) rc.top += (BALLOON_TEXT_MARGIN + infoPtr->rcMargin.top); rc.right -= (BALLOON_TEXT_MARGIN + infoPtr->rcMargin.right); rc.bottom -= (BALLOON_TEXT_MARGIN + infoPtr->rcMargin.bottom); + if(infoPtr->bToolBelow) rc.top += BALLOON_STEMHEIGHT; } else { @@ -351,6 +356,7 @@ TOOLTIPS_CalcTipSize (HWND hwnd, TOOLTIPS_INFO *infoPtr, LPSIZE lpSize) { HDC hdc; HFONT hOldFont; + DWORD style = GetWindowLongW(hwnd, GWL_STYLE); UINT uFlags = DT_EXTERNALLEADING | DT_CALCRECT; RECT rc = {0, 0, 0, 0}; @@ -358,7 +364,7 @@ TOOLTIPS_CalcTipSize (HWND hwnd, TOOLTIPS_INFO *infoPtr, LPSIZE lpSize) rc.right = infoPtr->nMaxTipWidth; uFlags |= DT_WORDBREAK; } - if (GetWindowLongA (hwnd, GWL_STYLE) & TTS_NOPREFIX) + if (style & TTS_NOPREFIX) uFlags |= DT_NOPREFIX; TRACE("%s\n", debugstr_w(infoPtr->szTipText)); @@ -368,12 +374,13 @@ TOOLTIPS_CalcTipSize (HWND hwnd, TOOLTIPS_INFO *infoPtr, LPSIZE lpSize) SelectObject (hdc, hOldFont); ReleaseDC (hwnd, hdc); - if (GetWindowLongW(hwnd, GWL_STYLE) & TTS_BALLOON) + if (style & TTS_BALLOON) { lpSize->cx = rc.right - rc.left + 2*BALLOON_TEXT_MARGIN + infoPtr->rcMargin.left + infoPtr->rcMargin.right; lpSize->cy = rc.bottom - rc.top + 2*BALLOON_TEXT_MARGIN + - infoPtr->rcMargin.bottom + infoPtr->rcMargin.top; + infoPtr->rcMargin.bottom + infoPtr->rcMargin.top + + BALLOON_STEMHEIGHT; } else { @@ -392,6 +399,8 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) RECT rect, wndrect; SIZE size; NMHDR hdr; + int ptfx = 0; + DWORD style = GetWindowLongW(hwnd, GWL_STYLE); if (infoPtr->nTool == -1) { TRACE("invalid tool (-1)!\n"); @@ -433,11 +442,49 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) MapWindowPoints (toolPtr->hwnd, NULL, (LPPOINT)&rc, 2); } rect.left = (rc.left + rc.right - size.cx) / 2; - rect.top = rc.bottom + 2; + if (style & TTS_BALLOON) + { + ptfx = rc.left + ((rc.right - rc.left) / 2); + if(rect.top - size.cy >= 0) + { + rect.top -= size.cy; + infoPtr->bToolBelow = FALSE; + } + else + { + infoPtr->bToolBelow = TRUE; + rect.top += 20; + } + rect.left = max(0, rect.left - BALLOON_STEMINDENT); + } + else + { + rect.top = rc.bottom + 2; + infoPtr->bToolBelow = TRUE; + } } else { GetCursorPos ((LPPOINT)&rect); - rect.top += 20; + if (style & TTS_BALLOON) + { + ptfx = rect.left; + if(rect.top - size.cy >= 0) + { + rect.top -= size.cy; + infoPtr->bToolBelow = FALSE; + } + else + { + infoPtr->bToolBelow = TRUE; + rect.top += 20; + } + rect.left = max(0, rect.left - BALLOON_STEMINDENT); + } + else + { + rect.top += 20; + infoPtr->bToolBelow = TRUE; + } } TRACE("pos %ld - %ld\n", rect.left, rect.top); @@ -468,12 +515,53 @@ TOOLTIPS_Show (HWND hwnd, TOOLTIPS_INFO *infoPtr) AdjustWindowRectEx (&rect, GetWindowLongA (hwnd, GWL_STYLE), FALSE, GetWindowLongA (hwnd, GWL_EXSTYLE)); - if (GetWindowLongW(hwnd, GWL_STYLE) & TTS_BALLOON) + if (style & TTS_BALLOON) { HRGN hRgn; + HRGN hrStem; + POINT pts[3]; - /* FIXME: need to add pointy bit using CreatePolyRgn & CombinRgn */ - hRgn = CreateRoundRectRgn(0, 0, rect.right - rect.left, rect.bottom - rect.top, BALLOON_ROUNDEDNESS, BALLOON_ROUNDEDNESS); + ptfx -= rect.left; + + if(infoPtr->bToolBelow) + { + pts[0].x = ptfx; + pts[0].y = 0; + pts[1].x = max(BALLOON_STEMINDENT, ptfx - (BALLOON_STEMWIDTH / 2)); + pts[1].y = BALLOON_STEMHEIGHT; + pts[2].x = pts[1].x + BALLOON_STEMWIDTH; + pts[2].y = pts[1].y; + if(pts[2].x > (rect.right - rect.left) - BALLOON_STEMINDENT) + { + pts[2].x = (rect.right - rect.left) - BALLOON_STEMINDENT; + pts[1].x = pts[2].x - BALLOON_STEMWIDTH; + } + } + else + { + pts[0].x = max(BALLOON_STEMINDENT, ptfx - (BALLOON_STEMWIDTH / 2)); + pts[0].y = (rect.bottom - rect.top) - BALLOON_STEMHEIGHT; + pts[1].x = pts[0].x + BALLOON_STEMWIDTH; + pts[1].y = pts[0].y; + pts[2].x = ptfx; + pts[2].y = (rect.bottom - rect.top); + if(pts[1].x > (rect.right - rect.left) - BALLOON_STEMINDENT) + { + pts[1].x = (rect.right - rect.left) - BALLOON_STEMINDENT; + pts[0].x = pts[1].x - BALLOON_STEMWIDTH; + } + } + + hrStem = CreatePolygonRgn(pts, sizeof(pts) / sizeof(pts[0]), ALTERNATE); + + hRgn = CreateRoundRectRgn(0, + (infoPtr->bToolBelow ? BALLOON_STEMHEIGHT : 0), + rect.right - rect.left, + (infoPtr->bToolBelow ? rect.bottom - rect.top : rect.bottom - rect.top - BALLOON_STEMHEIGHT), + BALLOON_ROUNDEDNESS, BALLOON_ROUNDEDNESS); + + CombineRgn(hRgn, hRgn, hrStem, RGN_OR); + DeleteObject(hrStem); SetWindowRgn(hwnd, hRgn, FALSE); /* we don't free the region handle as the system deletes it when diff --git a/reactos/lib/comctl32/winehq2ros.patch b/reactos/lib/comctl32/winehq2ros.patch index 24eff0d36b0..58175159064 100644 --- a/reactos/lib/comctl32/winehq2ros.patch +++ b/reactos/lib/comctl32/winehq2ros.patch @@ -4,7 +4,7 @@ RCS file: /home/wine/wine/dlls/comctl32/comctl32.spec,v retrieving revision 1.44 diff -u -r1.44 comctl32.spec --- comctl32.spec 17 May 2004 20:51:27 -0000 1.44 -+++ comctl32.spec 8 Aug 2004 13:10:59 -0000 ++++ comctl32.spec 14 Aug 2004 19:24:23 -0000 @@ -106,13 +106,13 @@ 412 stdcall RemoveWindowSubclass(long ptr long) 413 stdcall DefSubclassProc(long long long long) @@ -29,11 +29,11 @@ diff -u -r1.44 comctl32.spec Index: listview.c =================================================================== RCS file: /home/wine/wine/dlls/comctl32/listview.c,v -retrieving revision 1.390 -diff -u -r1.390 listview.c ---- listview.c 6 Jul 2004 21:27:34 -0000 1.390 -+++ listview.c 8 Aug 2004 13:11:03 -0000 -@@ -147,6 +147,7 @@ +retrieving revision 1.392 +diff -u -r1.392 listview.c +--- listview.c 12 Aug 2004 20:01:55 -0000 1.392 ++++ listview.c 14 Aug 2004 19:24:27 -0000 +@@ -146,6 +146,7 @@ #include #include #include @@ -41,7 +41,7 @@ diff -u -r1.390 listview.c #include #include #include -@@ -2023,7 +2024,8 @@ +@@ -2022,7 +2023,8 @@ infoPtr->iconSize.cy + ICON_BOTTOM_PADDING; Label.right = Label.left + labelSize.cx; Label.bottom = Label.top + infoPtr->nItemHeight; @@ -51,7 +51,7 @@ diff -u -r1.390 listview.c { labelSize.cy = min(Box.bottom - Label.top, labelSize.cy); labelSize.cy /= infoPtr->ntmHeight; -@@ -9517,7 +9519,8 @@ +@@ -9511,7 +9513,8 @@ hOldFont = SelectObject(hdc, infoPtr->hFont); /*Get String Length in pixels */ @@ -67,7 +67,7 @@ RCS file: /home/wine/wine/dlls/comctl32/string.c,v retrieving revision 1.4 diff -u -r1.4 string.c --- string.c 17 May 2004 20:51:27 -0000 1.4 -+++ string.c 8 Aug 2004 13:11:03 -0000 ++++ string.c 14 Aug 2004 19:24:27 -0000 @@ -254,7 +254,7 @@ { TRACE("(%s,%s)\n", debugstr_w(lpszStr), debugstr_w(lpszSearch));