forked from Mirrors/wine-wine
Revert "comctl32: Fix a potential regression in ImageList_ReplaceIcon()."
This reverts commit 9e772d1369
.
oldstable
parent
fdd9a4e2a7
commit
1e6786699d
|
@ -2252,7 +2252,6 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
|
||||||
BITMAP bmp;
|
BITMAP bmp;
|
||||||
BOOL ret;
|
BOOL ret;
|
||||||
POINT pt;
|
POINT pt;
|
||||||
INT i;
|
|
||||||
|
|
||||||
TRACE("(%p %d %p)\n", himl, nIndex, hIcon);
|
TRACE("(%p %d %p)\n", himl, nIndex, hIcon);
|
||||||
|
|
||||||
|
@ -2315,17 +2314,14 @@ ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
|
||||||
SetBkColor (himl->hdcImage, RGB(255,255,255));
|
SetBkColor (himl->hdcImage, RGB(255,255,255));
|
||||||
hbmOldSrc = SelectObject (hdcImage, ii.hbmColor);
|
hbmOldSrc = SelectObject (hdcImage, ii.hbmColor);
|
||||||
|
|
||||||
for (i=0; i<(bmp.bmWidth/himl->cx); i++) {
|
imagelist_point_from_index(himl, nIndex, &pt);
|
||||||
|
StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy,
|
||||||
|
hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY);
|
||||||
|
|
||||||
imagelist_point_from_index(himl, nIndex+i, &pt);
|
if (himl->hbmMask) {
|
||||||
StretchBlt (himl->hdcImage, pt.x, pt.y, himl->cx, himl->cy,
|
SelectObject (hdcImage, ii.hbmMask);
|
||||||
hdcImage, 0, 0, himl->cx*i, bmp.bmHeight, SRCCOPY);
|
StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy,
|
||||||
|
hdcImage, 0, 0, bmp.bmWidth, bmp.bmHeight, SRCCOPY);
|
||||||
if (himl->hbmMask) {
|
|
||||||
SelectObject (hdcImage, ii.hbmMask);
|
|
||||||
StretchBlt (himl->hdcMask, pt.x, pt.y, himl->cx, himl->cy,
|
|
||||||
hdcImage, 0, 0, himl->cx*i, bmp.bmHeight, SRCCOPY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SelectObject (hdcImage, hbmOldSrc);
|
SelectObject (hdcImage, hbmOldSrc);
|
||||||
|
|
Loading…
Reference in New Issue