Author: cwittich Date: Thu Mar 23 01:22:33 2006 New Revision: 21372
URL: http://svn.reactos.ru/svn/reactos?rev=21372&view=rev Log: restore the bitmap in hDCMem before deleting the DC
Modified: trunk/reactos/base/applications/imagesoft/imgedwnd.c
Modified: trunk/reactos/base/applications/imagesoft/imgedwnd.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/base/applications/imagesoft/... ============================================================================== --- trunk/reactos/base/applications/imagesoft/imgedwnd.c (original) +++ trunk/reactos/base/applications/imagesoft/imgedwnd.c Thu Mar 23 01:22:33 2006 @@ -211,11 +211,13 @@ HDC hDC, LPPAINTSTRUCT lpps) { + HBITMAP hOldBitmap; + if (Info->hBitmap) { Info->hDCMem = CreateCompatibleDC(hDC);
- SelectObject(Info->hDCMem, + hOldBitmap = (HBITMAP) SelectObject(Info->hDCMem, Info->hBitmap);
BitBlt(hDC, @@ -227,6 +229,8 @@ 0, 0, SRCCOPY); + + Info->hBitmap = SelectObject(Info->hDCMem, hOldBitmap);
DeleteDC(Info->hDCMem); }