X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0834140313212fc54d09e28d21a95476d6545f2..1a19e369fbce12ce4d8097fc08609a436748a6ed:/src/msw/cursor.cpp diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index 527c1dca2d..268a0931cb 100644 --- a/src/msw/cursor.cpp +++ b/src/msw/cursor.cpp @@ -35,6 +35,7 @@ #include "wx/bitmap.h" #include "wx/icon.h" #include "wx/cursor.h" + #include "wx/settings.h" #endif #include "wx/ptr_scpd.h" @@ -326,18 +327,16 @@ wxCursor::wxCursor(const wxString& filename, hcursor = ::LoadCursorFromFile(filename); break; - case wxBITMAP_TYPE_ICO: #if wxUSE_RESOURCE_LOADING_IN_MSW + case wxBITMAP_TYPE_ICO: hcursor = IconToCursor((wxChar *)filename.c_str(), wxGetInstance(), hotSpotX, hotSpotY, NULL, NULL); -#endif // wxUSE_RESOURCE_LOADING_IN_MSW break; case wxBITMAP_TYPE_BMP: { -#if wxUSE_RESOURCE_LOADING_IN_MSW HBITMAP hBitmap = 0; HPALETTE hPalette = 0; if ( wxReadDIB((wxChar *)filename.c_str(), &hBitmap, &hPalette) ) @@ -352,12 +351,12 @@ wxCursor::wxCursor(const wxString& filename, DeleteObject(hBitmap); } else -#endif // wxUSE_RESOURCE_LOADING_IN_MSW { hcursor = NULL; } } break; +#endif // wxUSE_RESOURCE_LOADING_IN_MSW default: wxFAIL_MSG( _T("unknown cursor resource type") ); @@ -370,7 +369,7 @@ wxCursor::wxCursor(const wxString& filename, m_refData = new wxCursorRefData(hcursor, true /* delete it later */); #if WXWIN_COMPATIBILITY_2 - refData->SetOk(); + ((wxCursorRefData *)m_refData)->SetOk(); #endif // WXWIN_COMPATIBILITY_2 } }