]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for warnings when wxUSE_RESOURCE_LOADING_IN_MSW == 0
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Feb 2003 00:57:47 +0000 (00:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Feb 2003 00:57:47 +0000 (00:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/cursor.cpp

index 527c1dca2ddb8882ee405d8e47cf8be15cd77cea..f1bbdb1336bb110262881d1ca87a20ac7c65c7db 100644 (file)
@@ -326,18 +326,16 @@ wxCursor::wxCursor(const wxString& filename,
             hcursor = ::LoadCursorFromFile(filename);
             break;
 
             hcursor = ::LoadCursorFromFile(filename);
             break;
 
-        case wxBITMAP_TYPE_ICO:
 #if wxUSE_RESOURCE_LOADING_IN_MSW
 #if wxUSE_RESOURCE_LOADING_IN_MSW
+        case wxBITMAP_TYPE_ICO:
             hcursor = IconToCursor((wxChar *)filename.c_str(),
                                    wxGetInstance(),
                                    hotSpotX, hotSpotY,
                                    NULL, NULL);
             hcursor = IconToCursor((wxChar *)filename.c_str(),
                                    wxGetInstance(),
                                    hotSpotX, hotSpotY,
                                    NULL, NULL);
-#endif // wxUSE_RESOURCE_LOADING_IN_MSW
             break;
 
         case wxBITMAP_TYPE_BMP:
             {
             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) )
                 HBITMAP hBitmap = 0;
                 HPALETTE hPalette = 0;
                 if ( wxReadDIB((wxChar *)filename.c_str(), &hBitmap, &hPalette) )
@@ -352,12 +350,12 @@ wxCursor::wxCursor(const wxString& filename,
                     DeleteObject(hBitmap);
                 }
                 else
                     DeleteObject(hBitmap);
                 }
                 else
-#endif // wxUSE_RESOURCE_LOADING_IN_MSW
                 {
                     hcursor = NULL;
                 }
             }
             break;
                 {
                     hcursor = NULL;
                 }
             }
             break;
+#endif // wxUSE_RESOURCE_LOADING_IN_MSW
 
         default:
             wxFAIL_MSG( _T("unknown cursor resource type") );
 
         default:
             wxFAIL_MSG( _T("unknown cursor resource type") );