[vtkusers] Mouse cursor resetting itself after call to SetCurrentCursor
David Cole
david.cole at kitware.com
Tue Oct 14 13:23:24 EDT 2008
The culprit in this case turned out to be the default WNDPROC for Win32
windows. We were not handling WM_SETCURSOR in the vtkWin32OpenGLRenderWindow
WNDPROC, so the default WNDPROC was resetting the cursor to the default on
every mouse move. (WM_SETCURSOR messages are generated frequently as you
move the mouse around...)
To fix this issue, I added a WM_SETCURSOR handler to VTK:
/cvsroot/VTK/VTK/Rendering/vtkWin32OpenGLRenderWindow.cxx,v <--
vtkWin32OpenGLRenderWindow.cxx
new revision: 1.158; previous revision: 1.157
It is now on my list for merging into the VTK-5-2 branch and it will
eventually appear in the VTK and ActiViz .NET 5.2.1 patch releases.
Thanks,
David Cole
On Tue, Sep 9, 2008 at 5:06 PM, Sarah Macumber <
S.Macumber at questreliability.com> wrote:
> Hi,
>
>
>
> I am having difficulty with setting the mouse cursor on the vtkRenderWindow
> in Dot Net. The cursor changes but then it is immediately reset back to the
> default.
>
>
>
> GraphicsWindowRenderWindow.SetCurrentCursor(4);
>
>
>
> Does anyone know why the cursor would be reset? It is still reset even
> with the following code added :
>
>
>
> vtkObserverMediator om = GraphicsWindowInteractor.GetObserverMediator();
>
> om.SetInteractor(GraphicsWindowInteractor);
>
>
> om.RemoveAllCursorShapeRequests((vtkInteractorObserver)GraphicsWindowInteractorStyle);
>
> int i = om.RequestCursorShape(GraphicsWindowInteractorStyle, 4);
>
>
>
> Thanks in advance,
>
> Sarah
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081014/9853502f/attachment.htm>
More information about the vtkusers
mailing list