Author: weiden
Date: Sat Sep 2 01:53:31 2006
New Revision: 23873
URL:
http://svn.reactos.org/svn/reactos?rev=23873&view=rev
Log:
Don't call BeginPaint/EndPaint while processing a WM_DRAWITEM message
Modified:
trunk/reactos/dll/cpl/timedate/timezone.c
Modified: trunk/reactos/dll/cpl/timedate/timezone.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timezone.…
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timezone.c (original)
+++ trunk/reactos/dll/cpl/timedate/timezone.c Sat Sep 2 01:53:31 2006
@@ -414,17 +414,17 @@
lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
if(lpDrawItem->CtlID == IDC_WORLD_BACKGROUND)
{
- PAINTSTRUCT ps;
- HDC hdc, hdcMem;
- hdc = BeginPaint(hwndDlg, &ps);
- hdcMem = CreateCompatibleDC(hdc);
- SelectObject(hdcMem, hBitmap);
- StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left,
lpDrawItem->rcItem.top,
- lpDrawItem->rcItem.right - lpDrawItem->rcItem.left,
- lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
- hdcMem, 0, 0, cxSource, cySource, SRCCOPY);
- DeleteDC(hdcMem);
- EndPaint(hwndDlg, &ps);
+ HDC hdcMem;
+ hdcMem = CreateCompatibleDC(lpDrawItem->hDC);
+ if (hdcMem != NULL)
+ {
+ SelectObject(hdcMem, hBitmap);
+ StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left,
lpDrawItem->rcItem.top,
+ lpDrawItem->rcItem.right - lpDrawItem->rcItem.left,
+ lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
+ hdcMem, 0, 0, cxSource, cySource, SRCCOPY);
+ DeleteDC(hdcMem);
+ }
}
}
break;