Applied patch [ 805147 ] GDI objects are not deselected from DC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23545 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
22dcb6df90
commit
e7222d659b
@ -1910,8 +1910,8 @@ HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)
|
||||
wxLogLastError(wxT("CreateBitmap"));
|
||||
}
|
||||
|
||||
::SelectObject(hdcSrc, hbmpMask);
|
||||
::SelectObject(hdcDst, hbmpInvMask);
|
||||
HGDIOBJ srcTmp = ::SelectObject(hdcSrc, hbmpMask);
|
||||
HGDIOBJ dstTmp = ::SelectObject(hdcDst, hbmpInvMask);
|
||||
if ( !::BitBlt(hdcDst, 0, 0, w, h,
|
||||
hdcSrc, 0, 0,
|
||||
NOTSRCCOPY) )
|
||||
@ -1919,6 +1919,10 @@ HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)
|
||||
wxLogLastError(wxT("BitBlt"));
|
||||
}
|
||||
|
||||
// Deselect objects
|
||||
SelectObject(hdcSrc,srcTmp);
|
||||
SelectObject(hdcDst,dstTmp);
|
||||
|
||||
::DeleteDC(hdcSrc);
|
||||
::DeleteDC(hdcDst);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user