Since theme images are reused now it's not really a good idea to
delete them in drawing functions.
This commit is contained in:
parent
f6e7e14ec5
commit
9a88d25ba4
|
@ -429,7 +429,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId,
|
|||
hdcSrc = CreateCompatibleDC(hdc);
|
||||
if(!hdcSrc) {
|
||||
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||
DeleteObject(bmpSrc);
|
||||
return hr;
|
||||
}
|
||||
oldSrc = SelectObject(hdcSrc, bmpSrc);
|
||||
|
@ -459,7 +458,6 @@ static HRESULT UXTHEME_DrawImageGlyph(HTHEME hTheme, HDC hdc, int iPartId,
|
|||
|
||||
SelectObject(hdcSrc, oldSrc);
|
||||
DeleteDC(hdcSrc);
|
||||
DeleteObject(bmpSrc);
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
@ -619,7 +617,6 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId,
|
|||
hdcSrc = CreateCompatibleDC(hdc);
|
||||
if(!hdcSrc) {
|
||||
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||
DeleteObject(bmpSrc);
|
||||
return hr;
|
||||
}
|
||||
oldSrc = SelectObject(hdcSrc, bmpSrc);
|
||||
|
@ -770,7 +767,6 @@ draw_error:
|
|||
SetViewportOrgEx (hdcDst, org.x, org.y, NULL);
|
||||
}
|
||||
SelectObject(hdcSrc, oldSrc);
|
||||
DeleteObject(bmpSrc);
|
||||
DeleteDC(hdcSrc);
|
||||
CopyRect(pRect, &rcDst);
|
||||
return hr;
|
||||
|
|
Loading…
Reference in New Issue