Author: greatlrd Date: Thu Jun 21 20:16:23 2007 New Revision: 27253
URL: http://svn.reactos.org/svn/reactos?rev=27253&view=rev Log: 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.
Modified: trunk/reactos/dll/win32/user32/windows/bitmap.c
Modified: trunk/reactos/dll/win32/user32/windows/bitmap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/bi... ============================================================================== --- trunk/reactos/dll/win32/user32/windows/bitmap.c (original) +++ trunk/reactos/dll/win32/user32/windows/bitmap.c Thu Jun 21 20:16:23 2007 @@ -681,46 +681,21 @@ && 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)