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

de Boer Ingo I.deBoer at polytec.de
Mon Feb 27 05:23:46 EST 2006


Hi Mark,

yes, this should be the correct way. At least, it took the
same way ;-) I am using my own interactor and use the OnContextMenu
from the CView class.

greets
  Ingo

---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255


> -----Original Message-----
> From: vtkusers-bounces+i.deboer=polytec.de at vtk.org 
> [mailto:vtkusers-bounces+i.deboer=polytec.de at vtk.org] On 
> Behalf Of Mark Gooding
> Sent: Monday, February 27, 2006 11:13 AM
> To: vtkusers
> Subject: [vtkusers] Enabling use a ContextMenu with vtk and 
> MFC (mouse-clickdetection)
> 
> 
> 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
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ Follow this link to 
> subscribe/unsubscribe: http://www.vtk.org/mailman/listinfo/vtkusers
> 



More information about the vtkusers mailing list