[vtkusers] VTK application nested in WIN32 GUI application does not respond to keypresses. Why?
Charl P. Botha
cpbotha at cpbotha.net
Sun Jan 21 09:01:24 EST 2007
On 1/18/07, Arne Hansen <bsd.diverse at gmail.com> wrote:
> Hello. I have nested a VTK app. in a WIN32 windows application in order to
> be able to make user of the available usercontrols.
> This works very well, and is really good. But i have a problem catching
> keyevents in my VTK application. For example, normally the standard renderer
> is set up to show wireframes if w is pressed and surface if s is pressed.
> But now when i run the VTK application in the WIN32 GUI nothing happens if i
> press either w or s or j or t or whatever.
You are probably not passing the relevant events from your Win32 GUI
to the embedded VTK application, so the VTK code has no way of knowing
that these keys have been pressed. See
http://cpbotha.net/vtkFlRenderWindowInteractor for a relatively simple
example on how to pass events through to VTK. In this case they are
being passed from FLTK to VTK, but the principle is the same.
Good luck,
Charl
More information about the vtkusers
mailing list