[vtkusers] RE: User interaction in VC++ / MFC application
Gopalakrishnan, Gowri
Gowri.Gopalakrishnan at inteq.com
Tue Oct 2 10:21:53 EDT 2001
You are talking at the level of MFC and I am working at the level of
window applciation. So what you do in class wizard is the same as what I do
in winproc. But the basic question is why does vtk interpret mouse events
and not key events?.
I looked at the source code of vtk and in vtkwindowinteractor->start method
there is a test on the flag InstallMessageProc and it looks liek if this
flag is true vtk handles the event else it passes it to windows.
By the way my proc code is very simple. In wm-create i create a exit button
and
start vtk application. I do not so far do anything for key press or mouse
press.
vtk however detects teh mouse press and not the key press. That is what is
confusing me. If vtk ignores both I can understand.
Thank you for you reply
Regards
Gowri
-----Original Message-----
From: Nigel Nunn [mailto:nNunn at ausport.gov.au]
Sent: Tuesday, October 02, 2001 3:03 PM
To: 'Gowri.Gopalakrishnan at inteq.com'
Subject: User interaction in VC++ / MFC application
Hi Gowri,
In our VC6/MFC applications, we do not use "WindowProc"
approach. Instead, we used Class Wizard to generate
handlers for all messages. This allows us to fine-tune
our response to user interaction. However, all such
messages eventually get passed to:
vtkHandleMessage2 (
this->m_hWnd, message,
wParam, lParam,
this->Interactor);
What version of Vtk are you using? You can find this in
vtkVersion.h. Also, which function are you calling,
vtkHandleMessage2(...) // new version
vtkHandleMessage(...) // old version
Can you send me your version of WindowProc(...)
thanks,
Nigel
More information about the vtkusers
mailing list