Commit 5cdd8a2a authored by Alexandre Julliard's avatar Alexandre Julliard

user32: Don't use a static dc for icon blitting.

parent c2202929
......@@ -674,10 +674,7 @@ static BOOL stretch_blt_icon(HBITMAP hDest, BITMAPINFO *pDestInfo, BITMAPINFO *p
{
HBITMAP hOld;
BOOL res = FALSE;
static HDC hdcMem = NULL;
if (!hdcMem)
hdcMem = CreateCompatibleDC(screen_dc);
HDC hdcMem = CreateCompatibleDC(screen_dc);
if (hdcMem)
{
......@@ -687,6 +684,7 @@ static BOOL stretch_blt_icon(HBITMAP hDest, BITMAPINFO *pDestInfo, BITMAPINFO *p
0, 0, pSrcInfo->bmiHeader.biWidth, pSrcInfo->bmiHeader.biHeight,
pSrcBits, pSrcInfo, DIB_RGB_COLORS, SRCCOPY);
SelectObject(hdcMem, hOld);
DeleteDC( hdcMem );
}
return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment