X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/368d59f0d858da22d91bcf668a7ea0781256e2cf..c6e2af4570ee868c93fc504b02f321efe5d5acee:/src/msw/dragimag.cpp?ds=sidebyside diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index c94a7d33d9..ae349c83fd 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -55,6 +55,12 @@ #include #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);