[ros-diffs] [cwittich] 22147: -forgot to check lpDrawItem->CtlID
cwittich at svn.reactos.org
cwittich at svn.reactos.org
Thu Jun 1 18:34:53 CEST 2006
Author: cwittich
Date: Thu Jun 1 20:34:53 2006
New Revision: 22147
URL: http://svn.reactos.ru/svn/reactos?rev=22147&view=rev
Log:
-forgot to check lpDrawItem->CtlID
Modified:
trunk/reactos/dll/cpl/timedate/timedate.c
Modified: trunk/reactos/dll/cpl/timedate/timedate.c
URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.c?rev=22147&r1=22146&r2=22147&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/timedate/timedate.c (original)
+++ trunk/reactos/dll/cpl/timedate/timedate.c Thu Jun 1 20:34:53 2006
@@ -809,18 +809,21 @@
case WM_DRAWITEM:
{
LPDRAWITEMSTRUCT lpDrawItem;
- PAINTSTRUCT ps;
- HDC hdc, hdcMem;
lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
- 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);
+ 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);
+ }
break;
}
case WM_COMMAND:
More information about the Ros-diffs
mailing list