]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/cursor.cpp
[ 1216436 ] cleanup 'shadow variable' warnings from gcc in headers.
[wxWidgets.git] / src / os2 / cursor.cpp
index 73a793577c00e57e4edfadce0862af421570009f..b2413b0df2606d78c7afd9a90cafc4abe086fcd7 100644 (file)
 #include "wx/app.h"
 #include "wx/cursor.h"
 #include "wx/icon.h"
-#include "wx/resource.h"
 #endif
 
 #include "wx/os2/private.h"
+#include "wx/os2/wxrsc.h"
 #include "wx/image.h"
 
 #include "assert.h"
@@ -135,6 +135,7 @@ wxCursor::wxCursor(
                                                                   );
             break;
 
+        case wxCURSOR_WATCH:
         case wxCURSOR_WAIT:
             pRefData->m_hCursor = (WXHCURSOR) ::WinQuerySysPointer( HWND_DESKTOP
                                                                    ,(ULONG)SPTR_WAIT
@@ -220,10 +221,10 @@ wxCursor::wxCursor(
             break;
 
         case wxCURSOR_NO_ENTRY:
-            pRefData->m_hCursor = (WXHCURSOR) ::WinLoadPointer( HWND_DESKTOP
-                                                               ,0
-                                                               ,(ULONG)wxCURSOR_NO_ENTRY
-                                                              );
+            pRefData->m_hCursor = (WXHCURSOR) ::WinQuerySysPointer( HWND_DESKTOP
+                                                                   ,(ULONG)SPTR_ILLEGAL
+                                                                   ,FALSE
+                                                                  );
             break;
 
         case wxCURSOR_LEFT_BUTTON:
@@ -254,13 +255,6 @@ wxCursor::wxCursor(
                                                                   );
             break;
 
-        case wxCURSOR_WATCH:
-            pRefData->m_hCursor = (WXHCURSOR) ::WinLoadPointer( HWND_DESKTOP
-                                                               ,0
-                                                               ,(ULONG)wxCURSOR_WATCH
-                                                              );
-            break;
-
         case wxCURSOR_SPRAYCAN:
             pRefData->m_hCursor = (WXHCURSOR) ::WinLoadPointer( HWND_DESKTOP
                                                               ,0
@@ -311,6 +305,10 @@ wxCursor::wxCursor(
                                                                   );
             break;
     }
+    //
+    // No need to destroy the stock cursors
+    //
+    ((wxCursorRefData *)m_refData)->m_bDestroyCursor = FALSE;
 } // end of wxCursor::wxCursor
 
 // Global cursor setting