From d380b6857db510770a76dbdfd527e5ef7a5ad8f8 Mon Sep 17 00:00:00 2001 From: Konstantin Kondratyuk Date: Fri, 16 Apr 2010 13:01:24 +0400 Subject: [PATCH] comctl32: Correct calculation of bitmap size in CreateDragImage --- dlls/comctl32/treeview.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 8eb0c6d..4551bd0 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -4281,15 +4281,15 @@ TREEVIEW_CreateDragImage(TREEVIEW_INFO *infoPtr, LPARAM lParam) else GetTextExtentPoint32A(hdc, "", 0, &size); - TRACE("%d %d %s\n", size.cx, size.cy, debugstr_w(dragItem->pszText)); - hbmp = CreateCompatibleBitmap(htopdc, size.cx, size.cy); - hOldbmp = SelectObject(hdc, hbmp); - ImageList_GetIconSize(infoPtr->himlNormal, &cx, &cy); size.cx += cx; if (cy > size.cy) size.cy = cy; + TRACE("%d %d %s\n", size.cx, size.cy, debugstr_w(dragItem->pszText)); + hbmp = CreateCompatibleBitmap(htopdc, size.cx, size.cy); + hOldbmp = SelectObject(hdc, hbmp); + infoPtr->dragList = ImageList_Create(size.cx, size.cy, ILC_COLOR, 10, 10); ImageList_Draw(infoPtr->himlNormal, dragItem->iImage, hdc, 0, 0, ILD_NORMAL); -- 1.6.5.8