]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dragimag.cpp
Fixed mouse handling for captured windows
[wxWidgets.git] / src / msw / dragimag.cpp
index ababd9e7cd092951c5fb30b65823a08a1ccf47c7..c94a7d33d91cd59d341ce8ddd7ec88755d822fa5 100644 (file)
@@ -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