[vtkusers] handle right mouse click

John Platt jcplatt at lineone.net
Tue Aug 16 15:48:44 EDT 2005


Hi Mark,

You could try the following in your CView derived class -

1. In OnCreate() 

   HWND hWnd = GetSafeHwnd();
   m_vtkRenderWindow->SetParentId( hWnd );

2. Remove WindowProc().

3. In OnInitialUpdate()

      m_vtkInteractor->AddObserver(vtkCommand::RightButtonPressEvent, 
                   m_vtkMouseEventCallbackCommand, 0.5 );

John.


-----Original Message-----
From: vtkusers-bounces+jcplatt=lineone.net at vtk.org
[mailto:vtkusers-bounces+jcplatt=lineone.net at vtk.org] On Behalf Of Mark
Wyszomierski
Sent: 16 August 2005 18:22
To: vtkusers at vtk.org
Subject: [vtkusers] handle right mouse click

Hi,

I have an mfc app similar to the vtk MDI MFC example. I can never
generate WM_RBUTTONDOWN messages though. I tried calling
InstallMessageProcOff() through my interactor like the documentation
says, but still no messages are generated. I have a WindowProc()
procedure - no messages there - I tried adding mfc's right click
function handler - no messages there.

I've seen this problem on the mailing list with no solution - what can
be done to get a chance to process this message ourselves before the
interactor takes over?

Thanks
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