mirror of
https://github.com/reactos/reactos.git
synced 2025-05-10 20:27:45 +00:00
fixing regress of icon drawing copyimage are complete mess and have allot of bugs.
I fixed tempary the icon drawing bug until I or some else got time rewriting copyimage image_load case here is known bugs 1. alpha icon does not working. 2. wrong background getting selected 3. and allot other thing. svn path=/trunk/; revision=27246
This commit is contained in:
parent
ec6a3bd4ea
commit
87c9cac62c
1 changed files with 29 additions and 4 deletions
|
@ -681,21 +681,46 @@ CopyImage(
|
||||||
&& bi->bmiColors[1].rgbReserved == 0);
|
&& bi->bmiColors[1].rgbReserved == 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
else if (!monochrome)
|
else if (!monochrome)
|
||||||
{
|
{
|
||||||
monochrome = ds.dsBm.bmBitsPixel == 1;
|
monochrome = ds.dsBm.bmBitsPixel == 1;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (monochrome)
|
if (monochrome)
|
||||||
{
|
{
|
||||||
res = CreateBitmap(desiredx, desiredy, 1, 1, NULL);
|
res = CreateBitmap(desiredx, desiredy, 1, 1, NULL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HDC screenDC = GetDC(NULL);
|
/* FIXME This is a tempary fix until we found time to rewrite copyimage */
|
||||||
res = CreateCompatibleBitmap(screenDC, desiredx, desiredy);
|
//HDC screenDC = GetDC(NULL); hnd
|
||||||
ReleaseDC(NULL, screenDC);
|
|
||||||
|
HBITMAP hOldBitmapBitmap, hOldBitmapLoad, hbmLoad;
|
||||||
|
HDC hdcImage, hdcBitmap;
|
||||||
|
|
||||||
|
hdcImage = CreateCompatibleDC(0);
|
||||||
|
hdcBitmap = CreateCompatibleDC(0);
|
||||||
|
|
||||||
|
hbmLoad = CreateBitmap (desiredx, desiredy, ds.dsBm.bmPlanes, ds.dsBm.bmBitsPixel, NULL);
|
||||||
|
hOldBitmapBitmap = SelectObject(hdcBitmap, (HBITMAP) hnd);
|
||||||
|
hOldBitmapLoad = SelectObject(hdcImage, hbmLoad);
|
||||||
|
|
||||||
|
/* Copy the user's image */
|
||||||
|
BitBlt (hdcImage, 0, 0, desiredx, desiredy, hdcBitmap, 0, 0, SRCCOPY);
|
||||||
|
|
||||||
|
SelectObject (hdcImage, hOldBitmapLoad);
|
||||||
|
SelectObject (hdcBitmap, hOldBitmapBitmap);
|
||||||
|
DeleteDC (hdcImage);
|
||||||
|
DeleteDC (hdcBitmap);
|
||||||
|
|
||||||
|
return hbmLoad;
|
||||||
|
|
||||||
|
|
||||||
|
//res = CreateCompatibleBitmap(screenDC, desiredx, desiredy);
|
||||||
|
//ReleaseDC(NULL, screenDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
|
|
Loading…
Reference in a new issue