// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
-#include "wx/msw/private.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
+#if wxUSE_DRAGIMAGE
+
#if defined(__WIN95__)
#ifndef WX_PRECOMP
#include "wx/settings.h"
#endif
+#include "wx/msw/private.h"
#include "wx/log.h"
#include "wx/intl.h"
#include "wx/frame.h"
#include "wx/msw/dragimag.h"
#include "wx/msw/private.h"
-#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__))
+#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
#include <commctrl.h>
#endif
// 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;
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
#endif
// __WIN95__
+#endif // wxUSE_DRAGIMAGE