restore the bitmap in hDCMem before deleting the DC

svn path=/trunk/; revision=21372
This commit is contained in:
Christoph von Wittich
2006-03-22 22:22:33 +00:00
parent 2df957f4a3
commit 4902277f8c
@@ -211,11 +211,13 @@ ImageEditWndRepaint(PEDIT_WND_INFO Info,
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,
@@ -228,6 +230,8 @@ ImageEditWndRepaint(PEDIT_WND_INFO Info,
0,
SRCCOPY);
Info->hBitmap = SelectObject(Info->hDCMem, hOldBitmap);
DeleteDC(Info->hDCMem);
}
}