]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/cursor.cpp
don't log erroneous error messages when writing an empty string to a wxTE_RICH2 control
[wxWidgets.git] / src / msw / cursor.cpp
index 527c1dca2ddb8882ee405d8e47cf8be15cd77cea..268a0931cb617fb9c8f1dfa191266f91b5632d60 100644 (file)
@@ -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
     }
 }