<div dir="ltr">If your intent is simply to receive the 'q' or 'e' keypress events, you can simply use AddObserver to listen for KeyPressEvent, CharEvent or KeyReleaseEvent directly from the vtkRenderWindowInteractor.<br>
<br><div>A Win32 vtkRenderWindowInteractor will only call PostQuitMessage and actually pop out of its own internal message loop if one was started by calling the Start() method.</div><div><br></div><div>If you are running inproc as a dll (as I think you are from your other postings) then you are probably not calling Start() and are probably relying on your containing application's Windows message loop... So you would need to intercept the keystrokes and do whatever is appropriate to quit your containing app.</div>
<div><br></div><div>Does this help?</div><div><br></div><div><br></div><div>Hope so,</div><div>David</div><div><br><div><div class="gmail_quote"><br></div><div class="gmail_quote">On Sat, Aug 9, 2008 at 2:21 AM, Phil Goddard <span dir="ltr"><<a href="mailto:philgoddard@telus.net">philgoddard@telus.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
I'm wondering if someone can explain to me how to call my own custom<br>
function when q or e is pressed on a vtkRenderWindowInteractor.<br>
<br>
The doc for vtkRenderWindowInteractor::TerminateApp says<br>
"This function is called on 'q','e' keypress if exitmethod is not specified<br>
and should be overridden by platform dependent subclasses to provide a<br>
termination procedure if one is required."<br>
<br>
However there is no mention (that I can see) of how to specify an<br>
exitmethod.<br>
<br>
>From searching old mailing-list messages it seems that there used to be a<br>
SetExitMethod method that took a pointer to a function in earlier versions,<br>
but it doesn't seem to exist any more.<br>
<br>
Can anyone shed some light on how I might go about this?<br>
<br>
I tried safedowncasting my interactor to a vtkWin32renderWindowInteractor<br>
and using its SetClassExitMethod however that seemed to have no effect.<br>
<br>
Thanks<br>
Phil.<br>
<br>
<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>
</blockquote></div><br></div></div></div>