mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 17:53:48 +00:00
Don't call BeginPaint/EndPaint while processing a WM_DRAWITEM message
svn path=/trunk/; revision=23873
This commit is contained in:
parent
c474673ac7
commit
00c354405e
1 changed files with 11 additions and 11 deletions
|
@ -414,17 +414,17 @@ TimeZonePageProc(HWND hwndDlg,
|
||||||
lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
|
lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
|
||||||
if(lpDrawItem->CtlID == IDC_WORLD_BACKGROUND)
|
if(lpDrawItem->CtlID == IDC_WORLD_BACKGROUND)
|
||||||
{
|
{
|
||||||
PAINTSTRUCT ps;
|
HDC hdcMem;
|
||||||
HDC hdc, hdcMem;
|
hdcMem = CreateCompatibleDC(lpDrawItem->hDC);
|
||||||
hdc = BeginPaint(hwndDlg, &ps);
|
if (hdcMem != NULL)
|
||||||
hdcMem = CreateCompatibleDC(hdc);
|
{
|
||||||
SelectObject(hdcMem, hBitmap);
|
SelectObject(hdcMem, hBitmap);
|
||||||
StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left, lpDrawItem->rcItem.top,
|
StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left, lpDrawItem->rcItem.top,
|
||||||
lpDrawItem->rcItem.right - lpDrawItem->rcItem.left,
|
lpDrawItem->rcItem.right - lpDrawItem->rcItem.left,
|
||||||
lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
|
lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
|
||||||
hdcMem, 0, 0, cxSource, cySource, SRCCOPY);
|
hdcMem, 0, 0, cxSource, cySource, SRCCOPY);
|
||||||
DeleteDC(hdcMem);
|
DeleteDC(hdcMem);
|
||||||
EndPaint(hwndDlg, &ps);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue