[vtkusers] mouse interaction + example
Gopalakrishnan, Gowri
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
one winproc).
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
to vtk.
With this you know exactly what interactions are happening and it is
completely in your control.
Regards
Gowri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testwindow.cpp
Type: application/octet-stream
Size: 6439 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20021008/bfd3e490/attachment.obj>
More information about the vtkusers
mailing list