X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e6feb95a79834836e88143b15d9f424ebe79621..3f2b72b2403dd29aa93167ce0ce7d20e1d20f1bd:/src/msw/dragimag.cpp diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 5a9c132e61..c94a7d33d9 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -28,7 +28,7 @@ #pragma hdrstop #endif -#if wxUSE_DRAGIMAG +#if wxUSE_DRAGIMAGE #if defined(__WIN95__) @@ -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 @@ -435,4 +433,4 @@ bool wxDragImage::Hide() #endif // __WIN95__ -#endif // wxUSE_DRAGIMAG +#endif // wxUSE_DRAGIMAGE