[vtkusers] mouse interaction + example
Gowri.Gopalakrishnan at inteq.com
Tue Oct 8 10:21:05 EDT 2002
C++ mouse interaction:
Here is a sample file. Pardon me for lack of order in this file. I did this
as test long time ago and I just attach it here to convey the idea..
First of all it is written for non MFC win32 application.
In the WinMain there is a call to set up vtk (method : myVTKApp)
Here I use directly vtk window. If you don't want this use SetParentId on
the renderwindow and pass the window handle.
Inside the myVTKApp there is a call to set the winproc (GetWindowLong).
(I used two winprocs (1,2) to understand the behaviour , but you need only
Your mouse, key event arrives at the winproc and it could be either WM_CHAR
or any other. So there you have the event and now you can do what you want
with it. If you just want to pass it to vtk use vtkHandleMessage2 to pass it
With this you know exactly what interactions are happening and it is
completely in your control.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6439 bytes
Desc: not available
More information about the vtkusers