Applied patch [ 1207202 ] [wxMSW] Fixes GDI leak in cursor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34400 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2005-05-30 08:34:56 +00:00
parent f05ba7ff38
commit ccbb33c91b

View File

@ -202,13 +202,13 @@ wxCursor::wxCursor(const wxImage& image)
} }
else if ((w != image_w) || (h != image_h)) else if ((w != image_w) || (h != image_h))
{ {
hotSpotX = int(hotSpotX * double(w) / double(image_w)); hotSpotX = int(hotSpotX * double(w) / double(image_w));
hotSpotY = int(hotSpotY * double(h) / double(image_h)); hotSpotY = int(hotSpotY * double(h) / double(image_h));
imageSized = image.Scale(w, h); imageSized = image.Scale(w, h);
} }
HCURSOR hcursor = wxBitmapToHCURSOR( wxBitmap(imageSized), HCURSOR hcursor = wxBitmapToHCURSOR( wxBitmap(imageSized),
hotSpotX, hotSpotY ); hotSpotX, hotSpotY );
if ( !hcursor ) if ( !hcursor )
@ -357,7 +357,8 @@ wxCursor::wxCursor(int idCursor)
} }
else else
{ {
m_refData = new wxCursorRefData(hcursor); m_refData = new wxCursorRefData(hcursor,
!stdCursor.isStd /* delete it later */);
} }
} }