]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed cursor loading on Win95
authorJulian Smart <julian@anthemion.co.uk>
Wed, 8 Sep 1999 12:39:41 +0000 (12:39 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Wed, 8 Sep 1999 12:39:41 +0000 (12:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/cursor.cpp

index 3ae986e71920c46b861e365ffd3a9b29d60e7bda..4d2bdf322dc6352b0ca717a6faa56a7e6c211afa 100644 (file)
@@ -80,7 +80,11 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
   M_CURSORDATA->m_ok = FALSE;
   if (flags & wxBITMAP_TYPE_CUR_RESOURCE)
   {
+#ifdef __WIN95__
+    M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadImage(wxGetInstance(), cursor_file, IMAGE_CURSOR, 0, 0, 0);
+#else
     M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadCursor(wxGetInstance(), cursor_file);
+#endif
     if (M_CURSORDATA->m_hCursor)
       M_CURSORDATA->m_ok = TRUE;
     else
@@ -88,9 +92,13 @@ wxCursor::wxCursor(const wxString& cursor_file, long flags, int hotSpotX, int ho
   }
   else if (flags & wxBITMAP_TYPE_CUR)
   {
+#ifdef __WIN95__
+    M_CURSORDATA->m_hCursor = (WXHCURSOR) LoadImage(wxGetInstance(), cursor_file, IMAGE_CURSOR, 0, 0, LR_LOADFROMFILE);
+#else
 #if wxUSE_RESOURCE_LOADING_IN_MSW
     M_CURSORDATA->m_hCursor = (WXHCURSOR) ReadCursorFile(WXSTRINGCAST cursor_file, wxGetInstance(), &M_CURSORDATA->m_width, &M_CURSORDATA->m_height);
     M_CURSORDATA->m_destroyCursor = TRUE;
+#endif
 #endif
   }
   else if (flags & wxBITMAP_TYPE_ICO)