]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dragimag.cpp
made SetDirectory() work, minor code cleanup (much is left to do)
[wxWidgets.git] / src / msw / dragimag.cpp
index fcad2efdfd370181d6f5ecc5e119c087eed89fa8..b80fac16b7217dc1a5e009b883c85f8a911f5b8e 100644 (file)
 #include <commctrl.h>
 #endif
 
+// Wine doesn't have this yet
+#ifndef ListView_CreateDragImage
+#define ListView_CreateDragImage(hwnd, i, lpptUpLeft) \
+    (HIMAGELIST)SNDMSG((hwnd), LVM_CREATEDRAGIMAGE, (WPARAM)(int)(i), (LPARAM)(LPPOINT)(lpptUpLeft))
+#endif
+
 // ----------------------------------------------------------------------------
 // macros
 // ----------------------------------------------------------------------------
@@ -192,7 +198,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 +228,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