mirror of
https://github.com/reactos/reactos.git
synced 2025-06-03 08:20:27 +00:00
revert 27246 it is a hack a proper fix should be done in gdi32 or win32k
thx ged for review the old code with me, and talking what can be wrong this hack also solv dispare buttom in some case. svn path=/trunk/; revision=27253
This commit is contained in:
parent
9c62047e36
commit
a06823792a
1 changed files with 4 additions and 29 deletions
|
@ -681,46 +681,21 @@ CopyImage(
|
|||
&& bi->bmiColors[1].rgbReserved == 0);
|
||||
}
|
||||
}
|
||||
/*
|
||||
else if (!monochrome)
|
||||
{
|
||||
monochrome = ds.dsBm.bmBitsPixel == 1;
|
||||
}
|
||||
*/
|
||||
|
||||
if (monochrome)
|
||||
{
|
||||
res = CreateBitmap(desiredx, desiredy, 1, 1, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* FIXME This is a tempary fix until we found time to rewrite copyimage */
|
||||
//HDC screenDC = GetDC(NULL); hnd
|
||||
|
||||
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);
|
||||
HDC screenDC = GetDC(NULL);
|
||||
res = CreateCompatibleBitmap(screenDC, desiredx, desiredy);
|
||||
ReleaseDC(NULL, screenDC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (res)
|
||||
|
|
Loading…
Reference in a new issue