<div dir="ltr">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...)<div>
<br></div><div>To fix this issue, I added a WM_SETCURSOR handler to VTK:</div><div><div>&nbsp;&nbsp; &nbsp;/cvsroot/VTK/VTK/Rendering/vtkWin32OpenGLRenderWindow.cxx,v &nbsp;&lt;-- &nbsp;vtkWin32OpenGLRenderWindow.cxx</div><div>&nbsp;&nbsp; &nbsp;new revision: 1.158; previous revision: 1.157</div>
<div><br></div><div>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.</div><div><br></div><div><br></div>Thanks,</div><div>David Cole</div>
<div><br></div><div><br><div class="gmail_quote">On Tue, Sep 9, 2008 at 5:06 PM, Sarah Macumber <span dir="ltr">&lt;<a href="mailto:S.Macumber@questreliability.com">S.Macumber@questreliability.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">








<div lang="EN-US" link="blue" vlink="purple">

<div>

<p style="text-autospace:none"><span style="font-size:10.0pt">Hi, </span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">&nbsp;</span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">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.</span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">&nbsp;</span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">GraphicsWindowRenderWindow.SetCurrentCursor(4);</span></p>

<p><span style="font-size:10.0pt">&nbsp;</span></p>

<p><span style="font-size:10.0pt">Does
anyone know why the cursor would be reset?&nbsp; It is still reset even with the
following code added :</span></p>

<p><span style="font-size:10.0pt">&nbsp;</span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">vtkObserverMediator om =
GraphicsWindowInteractor.GetObserverMediator();</span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">om.SetInteractor(GraphicsWindowInteractor);</span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">om.RemoveAllCursorShapeRequests((vtkInteractorObserver)GraphicsWindowInteractorStyle);</span></p>

<p style="text-autospace:none"><span style="font-size:10.0pt">int i =
om.RequestCursorShape(GraphicsWindowInteractorStyle, 4);</span></p>

<p>&nbsp;</p>

<p>Thanks in advance,</p>

<p>Sarah</p>

</div>

</div>


<br>_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div></div>