#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
// ----------------------------------------------------------------------------
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);
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