Mike McCormack : comctl32: Remove a Nx1 assuption in
ImageList_AddMasked().
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 6 05:48:34 CST 2006
Module: wine
Branch: master
Commit: 6772873396dfe5f0b124c9b63c00e18fe3804037
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6772873396dfe5f0b124c9b63c00e18fe3804037
Author: Mike McCormack <mike at codeweavers.com>
Date: Sun Nov 5 17:59:19 2006 +0900
comctl32: Remove a Nx1 assuption in ImageList_AddMasked().
---
dlls/comctl32/imagelist.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 3f8b49f..20da02f 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -300,7 +300,7 @@ INT WINAPI
ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
{
HDC hdcMask, hdcBitmap;
- INT nIndex, nImageCount, nMaskXOffset=0;
+ INT nIndex, nImageCount;
BITMAP bmp;
HBITMAP hOldBitmap;
HBITMAP hMaskBitmap=0;
@@ -331,7 +331,6 @@ ImageList_AddMasked (HIMAGELIST himl, HB
if(himl->hbmMask)
{
hdcMask = himl->hdcMask;
- nMaskXOffset = nIndex * himl->cx;
imagelist_point_from_index( himl, nIndex, &pt );
}
else
@@ -343,7 +342,6 @@ ImageList_AddMasked (HIMAGELIST himl, HB
hdcMask = CreateCompatibleDC(0);
hMaskBitmap = CreateBitmap(bmp.bmWidth, bmp.bmHeight, 1, 1, NULL);
SelectObject(hdcMask, hMaskBitmap);
- nMaskXOffset = 0;
imagelist_point_from_index( himl, 0, &pt );
}
/* create monochrome image to the mask bitmap */
@@ -370,7 +368,7 @@ ImageList_AddMasked (HIMAGELIST himl, HB
BitBlt(hdcBitmap,
0, 0, bmp.bmWidth, bmp.bmHeight,
hdcMask,
- nMaskXOffset, 0,
+ pt.x, pt.y,
0x220326); /* NOTSRCAND */
/* Copy result to the imagelist
*/
More information about the wine-cvs
mailing list