]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dragimag.cpp
restore generic DrawEllipticArc() used by CE which was lost during the great wxDC...
[wxWidgets.git] / src / msw / dragimag.cpp
index 01e42a155db3caa43780594aedcb59809363364a..4f42ad81d99ef53768300cbfffeeb7e41fdc7354 100644 (file)
@@ -27,6 +27,7 @@
 #if wxUSE_DRAGIMAGE
 
 #ifndef WX_PRECOMP
+    #include "wx/msw/wrapcctl.h" // include <commctrl.h> "properly"
     #include <stdio.h>
     #include "wx/window.h"
     #include "wx/dcclient.h"
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/frame.h"
+    #include "wx/image.h"
 #endif
 
 #include "wx/msw/private.h"
-#include "wx/frame.h"
-#include "wx/image.h"
 
 #include "wx/msw/dragimag.h"
 #include "wx/msw/private.h"
@@ -48,9 +49,6 @@
 #include "wx/msw/wince/missing.h"
 #endif // __WXWINCE__
 
-// include <commctrl.h> "properly"
-#include "wx/msw/wrapcctl.h"
-
 // Wine doesn't have this yet
 #ifndef ListView_CreateDragImage
 #define ListView_CreateDragImage(hwnd, i, lpptUpLeft) \
@@ -184,9 +182,8 @@ bool wxDragImage::Create(const wxIcon& image, const wxCursor& cursor)
     else
         flags = ILC_COLOR32;
 #endif
-    bool mask = true;
-    if ( mask )
-        flags |= ILC_MASK;
+
+    flags |= ILC_MASK;
 
     m_hImageList = (WXHIMAGELIST) ImageList_Create(image.GetWidth(), image.GetHeight(), flags, 1, 1);
 
@@ -208,7 +205,7 @@ bool wxDragImage::Create(const wxString& str, const wxCursor& cursor)
 {
     wxFont font(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
-    long w = 0, h = 0;
+    wxCoord w = 0, h = 0;
     wxScreenDC dc;
     dc.SetFont(font);
     dc.GetTextExtent(str, & w, & h);