X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/eff4ffbf4f9b38beda8df150766afc2f82ad04c8..07601f59450069025a45bd25de6961c8544f6449:/src/msw/cursor.cpp diff --git a/src/msw/cursor.cpp b/src/msw/cursor.cpp index d834b7dc53..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) ) @@ -350,7 +349,6 @@ wxCursor::wxCursor(const wxString& filename, pt.y = hotSpotY; hcursor = MakeCursorFromBitmap(wxGetInstance(), hBitmap, &pt); DeleteObject(hBitmap); -#endif // wxUSE_RESOURCE_LOADING_IN_MSW } else { @@ -358,6 +356,7 @@ wxCursor::wxCursor(const wxString& filename, } } 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 } }