fix for warnings when wxUSE_RESOURCE_LOADING_IN_MSW == 0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-02-04 00:57:47 +00:00
parent f6eff86e7e
commit 677a9e28b5

View File

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