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

This commit is contained in:
Alexandre Julliard 2009-10-05 15:18:10 +02:00
parent c2202929ab
commit 5cdd8a2a48
1 changed files with 2 additions and 4 deletions

View File

@ -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;