mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 18:40:59 +00:00
Don't use DeleteDC on DC handles returned by GetDC.
svn path=/trunk/; revision=16747
This commit is contained in:
parent
1d059a1ddf
commit
fc8add5154
|
@ -290,8 +290,8 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
||||||
if (iw || bw) {
|
if (iw || bw) {
|
||||||
HDC hClipDC = GetDC(hwnd);
|
HDC hClipDC = GetDC(hwnd);
|
||||||
HRGN hClipRgn = CreateRectRgn(r.left, r.top, r.right, r.bottom);
|
HRGN hClipRgn = CreateRectRgn(r.left, r.top, r.right, r.bottom);
|
||||||
SelectClipRgn(hClipDC, hClipRgn);
|
|
||||||
|
|
||||||
|
SelectClipRgn(hClipDC, hClipRgn);
|
||||||
if (bw) {
|
if (bw) {
|
||||||
HDC hdcBitmap = CreateCompatibleDC (hClipDC);
|
HDC hdcBitmap = CreateCompatibleDC (hClipDC);
|
||||||
SelectObject (hdcBitmap, phdi->hbm);
|
SelectObject (hdcBitmap, phdi->hbm);
|
||||||
|
@ -307,7 +307,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteObject(hClipRgn);
|
DeleteObject(hClipRgn);
|
||||||
DeleteDC(hClipDC);
|
ReleaseDC(hwnd, hClipDC);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((phdi->fmt & HDF_STRING)
|
if (((phdi->fmt & HDF_STRING)
|
||||||
|
|
Loading…
Reference in a new issue