X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fa8dca8dd1ba0d6ee9b2c5919a3a944ecde68a50..e7300ec6d9ebbd1cfa2fcf12c0ce6e5aee85a152:/src/msw/dragimag.cpp diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index fcad2efdfd..c94a7d33d9 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -192,7 +192,7 @@ bool wxDragImage::Create(const wxIcon& image, const wxCursor& cursor) // Create a drag image from a string and optional cursor bool wxDragImage::Create(const wxString& str, const wxCursor& cursor) { - wxFont font(wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT)); + wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); long w, h; wxScreenDC dc; @@ -222,11 +222,9 @@ bool wxDragImage::Create(const wxString& str, const wxCursor& cursor) dc2.SelectObject(wxNullBitmap); // Make the bitmap masked - wxImage image(bitmap); + wxImage image = bitmap.ConvertToImage(); image.SetMaskColour(255, 255, 255); - bitmap = image.ConvertToBitmap(); - - return Create(bitmap, cursor); + return Create(wxBitmap(image), cursor); } // Create a drag image for the given tree control item