[osg-users] GraphicsWindowWin32: InheritCursor problems

Mikhail I. Izmestev izmmishao5 at gmail.com
Thu Nov 12 11:20:58 PST 2009

Mikhail I. Izmestev wrote:
> But when I try to use this solution with osg own
> window it not works, because when WM_NCHITTEST message received,
> _mouseCursor changes from InheritCursor and then WM_SETCURSOR message
> handler work incorrect.  

What you think about using _appMouseCursor instead _mouseCursor into
WM_SETCURSOR handler to solve this problem?

Index: src/osgViewer/GraphicsWindowWin32.cpp
--- src/osgViewer/GraphicsWindowWin32.cpp    (revision 10745)
+++ src/osgViewer/GraphicsWindowWin32.cpp    (working copy)
@@ -2308,11 +2308,11 @@
         case WM_SETCURSOR :
             //The cursor is only modified in response to the
WM_SETCURSOR message if the mouse cursor isn't set to
             //InheritCursor.  InheritCursor lets the user manage the
cursor externally.
-            if (_mouseCursor != InheritCursor)
+            if (_appMouseCursor != InheritCursor)
                 if (_traits->useCursor)
                     ::SetCursor( _currentCursor);


More information about the osg-users mailing list