mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 07:37:02 +00:00
comctl32: imagelist: Fix simultaneous selection of one bitmap into two device contexts.
This commit is contained in:
parent
f083b3c038
commit
fc5a746104
1 changed files with 5 additions and 3 deletions
|
@ -2563,7 +2563,7 @@ BOOL WINAPI
|
|||
ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
|
||||
{
|
||||
HDC hdcBitmap;
|
||||
HBITMAP hbmNewBitmap;
|
||||
HBITMAP hbmNewBitmap, hbmOld;
|
||||
INT nNewCount, nCopyCount;
|
||||
|
||||
TRACE("%p %d\n",himl,iImageCount);
|
||||
|
@ -2588,8 +2588,9 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
|
|||
|
||||
if (hbmNewBitmap != 0)
|
||||
{
|
||||
SelectObject (hdcBitmap, hbmNewBitmap);
|
||||
hbmOld = SelectObject (hdcBitmap, hbmNewBitmap);
|
||||
imagelist_copy_images( himl, himl->hdcImage, hdcBitmap, 0, nCopyCount, 0 );
|
||||
SelectObject (hdcBitmap, hbmOld);
|
||||
|
||||
/* FIXME: delete 'empty' image space? */
|
||||
|
||||
|
@ -2607,8 +2608,9 @@ ImageList_SetImageCount (HIMAGELIST himl, UINT iImageCount)
|
|||
hbmNewBitmap = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL);
|
||||
if (hbmNewBitmap != 0)
|
||||
{
|
||||
SelectObject (hdcBitmap, hbmNewBitmap);
|
||||
hbmOld = SelectObject (hdcBitmap, hbmNewBitmap);
|
||||
imagelist_copy_images( himl, himl->hdcMask, hdcBitmap, 0, nCopyCount, 0 );
|
||||
SelectObject (hdcBitmap, hbmOld);
|
||||
|
||||
/* FIXME: delete 'empty' image space? */
|
||||
|
||||
|
|
Loading…
Reference in a new issue