X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8326d649c00a47d3e77770a8e0a0a3b7ead56bb..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/msw/cursor.cpp?ds=inline diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index b50ffa1052..5e0bb783f9 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -33,11 +33,10 @@ #include "wx/icon.h" #include "wx/settings.h" #include "wx/intl.h" + #include "wx/image.h" + #include "wx/module.h" #endif -#include "wx/module.h" -#include "wx/image.h" - #include "wx/msw/private.h" #include "wx/msw/missing.h" // IDC_HAND @@ -210,19 +209,15 @@ wxCursor::wxCursor(const wxImage& image) HCURSOR hcursor = wxBitmapToHCURSOR( wxBitmap(imageSized), hotSpotX, hotSpotY ); -#if wxUSE_WXDIB if ( !hcursor ) { wxLogWarning(_("Failed to create cursor.")); return; } -#else - HCURSOR hcursor = 0; -#endif m_refData = new wxCursorRefData(hcursor, true /* delete it later */); } -#endif +#endif // wxUSE_IMAGE wxCursor::wxCursor(const char WXUNUSED(bits)[], int WXUNUSED(width), @@ -257,12 +252,12 @@ wxCursor::wxCursor(const wxString& filename, switch ( kind ) { case wxBITMAP_TYPE_CUR_RESOURCE: - hcursor = ::LoadCursor(wxGetInstance(), filename); + hcursor = ::LoadCursor(wxGetInstance(), filename.fn_str()); break; #ifndef __WXWINCE__ case wxBITMAP_TYPE_CUR: - hcursor = ::LoadCursorFromFile(filename); + hcursor = ::LoadCursorFromFile(filename.fn_str()); break; #endif @@ -387,16 +382,6 @@ wxCursor::~wxCursor() // other wxCursor functions // ---------------------------------------------------------------------------- -bool wxCursor::operator==(const wxCursor& cursor) const -{ - if ( !m_refData ) - return !cursor.m_refData; - - return cursor.m_refData && - ((wxCursorRefData *)m_refData)->m_hCursor == - ((wxCursorRefData *)cursor.m_refData)->m_hCursor; -} - wxGDIImageRefData *wxCursor::CreateData() const { return new wxCursorRefData; @@ -421,5 +406,3 @@ void wxSetCursor(const wxCursor& cursor) *gs_globalCursor = cursor; } } - -