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:
		@@ -1910,8 +1910,8 @@ HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)
 | 
				
			|||||||
        wxLogLastError(wxT("CreateBitmap"));
 | 
					        wxLogLastError(wxT("CreateBitmap"));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ::SelectObject(hdcSrc, hbmpMask);
 | 
					    HGDIOBJ srcTmp = ::SelectObject(hdcSrc, hbmpMask);
 | 
				
			||||||
    ::SelectObject(hdcDst, hbmpInvMask);
 | 
					    HGDIOBJ dstTmp = ::SelectObject(hdcDst, hbmpInvMask);
 | 
				
			||||||
    if ( !::BitBlt(hdcDst, 0, 0, w, h,
 | 
					    if ( !::BitBlt(hdcDst, 0, 0, w, h,
 | 
				
			||||||
                   hdcSrc, 0, 0,
 | 
					                   hdcSrc, 0, 0,
 | 
				
			||||||
                   NOTSRCCOPY) )
 | 
					                   NOTSRCCOPY) )
 | 
				
			||||||
@@ -1919,6 +1919,10 @@ HBITMAP wxInvertMask(HBITMAP hbmpMask, int w, int h)
 | 
				
			|||||||
        wxLogLastError(wxT("BitBlt"));
 | 
					        wxLogLastError(wxT("BitBlt"));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Deselect objects
 | 
				
			||||||
 | 
					    SelectObject(hdcSrc,srcTmp);
 | 
				
			||||||
 | 
					    SelectObject(hdcDst,dstTmp);
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
    ::DeleteDC(hdcSrc);
 | 
					    ::DeleteDC(hdcSrc);
 | 
				
			||||||
    ::DeleteDC(hdcDst);
 | 
					    ::DeleteDC(hdcDst);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user