Don't use DeleteDC on DC handles returned by GetDC.

svn path=/trunk/; revision=16747
This commit is contained in:
Filip Navara 2005-07-26 15:47:26 +00:00
parent 1d059a1ddf
commit fc8add5154

View file

@ -290,8 +290,8 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
if (iw || bw) {
HDC hClipDC = GetDC(hwnd);
HRGN hClipRgn = CreateRectRgn(r.left, r.top, r.right, r.bottom);
SelectClipRgn(hClipDC, hClipRgn);
SelectClipRgn(hClipDC, hClipRgn);
if (bw) {
HDC hdcBitmap = CreateCompatibleDC (hClipDC);
SelectObject (hdcBitmap, phdi->hbm);
@ -307,7 +307,7 @@ HEADER_DrawItem (HWND hwnd, HDC hdc, INT iItem, BOOL bHotTrack)
}
DeleteObject(hClipRgn);
DeleteDC(hClipDC);
ReleaseDC(hwnd, hClipDC);
}
if (((phdi->fmt & HDF_STRING)