[vtkusers] Enabling use a ContextMenu with vtk and MFC (mouse-click detection)

Mark Gooding mark.gooding at gmail.com
Mon Feb 27 05:13:12 EST 2006


Hello all,

A while ago I emailed about trying to set up a ContextMenu when the
right mouse button is clicked on the vtkWindow in MFC. The problem was
that the vtkMFCWindow does not respond to the clicks (despite the
example having a function within it that appears to suggest it
should), instead the mouse action seems to passed directly to the
vtkWindowInteractor.

To solve this problem I think I should be subclassing
vtkWindowInteractorStyle, so that I can either remove the handling of
right mouse click (so that the window handles it) or modify it to pass
clicks directly to the CView class.

Does this sound like a sensible approach? Or is there a better/more
standard solution? I didn't want to set off programming without at
least knowing that I heading in the right direction!

Cheers,

Mark



More information about the vtkusers mailing list