mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 07:14:04 +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;
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue