From a06823792ab3f0e7e6a4b139cde259e29bc0f49a Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Thu, 21 Jun 2007 16:16:23 +0000 Subject: [PATCH] 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 --- reactos/dll/win32/user32/windows/bitmap.c | 33 +++-------------------- 1 file changed, 4 insertions(+), 29 deletions(-) diff --git a/reactos/dll/win32/user32/windows/bitmap.c b/reactos/dll/win32/user32/windows/bitmap.c index 553addd9985..3124929186d 100644 --- a/reactos/dll/win32/user32/windows/bitmap.c +++ b/reactos/dll/win32/user32/windows/bitmap.c @@ -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)