]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dragimag.cpp
Only send two EVT_BUTTON events when double clicking a button, not three
[wxWidgets.git] / src / msw / dragimag.cpp
index c94a7d33d91cd59d341ce8ddd7ec88755d822fa5..ae349c83fd4ac2fbda0c17e954d7b09d202bdf81 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
 // ----------------------------------------------------------------------------
@@ -123,8 +129,12 @@ bool wxDragImage::Create(const wxBitmap& image, const wxCursor& cursor)
         flags = ILC_COLOR32;
 
     bool mask = (image.GetMask() != 0);
-    if ( mask )
-        flags |= ILC_MASK;
+
+    // Curiously, even if the image doesn't have a mask,
+    // we still have to use ILC_MASK or the image won't show
+    // up when dragged.
+//    if ( mask )
+    flags |= ILC_MASK;
 
     m_hImageList = (WXHIMAGELIST) ImageList_Create(image.GetWidth(), image.GetHeight(), flags, 1, 1);