X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/64c288fa47480385ad656ae3249b5b131340c1d6..6493aacaeb7b22b9fa35c559f7753e9fec0da71f:/src/msw/dragimag.cpp diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 761c33e6a0..95ce39da52 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -28,7 +28,6 @@ #ifndef WX_PRECOMP #include -#include "wx/setup.h" #include "wx/window.h" #include "wx/dcclient.h" #include "wx/dcscreen.h" @@ -209,7 +208,7 @@ bool wxDragImage::Create(const wxString& str, const wxCursor& cursor) { wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); - long w, h; + long w = 0, h = 0; wxScreenDC dc; dc.SetFont(font); dc.GetTextExtent(str, & w, & h); @@ -298,9 +297,14 @@ bool wxDragImage::BeginDrag(const wxPoint& hotspot, wxWindow* window, bool fullS #else if (!m_hCursorImageList) { +#ifndef SM_CXCURSOR + // Smartphone may not have these metric symbol + int cxCursor = 16; + int cyCursor = 16; +#else int cxCursor = ::GetSystemMetrics(SM_CXCURSOR); int cyCursor = ::GetSystemMetrics(SM_CYCURSOR); - +#endif m_hCursorImageList = (WXHIMAGELIST) ImageList_Create(cxCursor, cyCursor, ILC_MASK, 1, 1); }