[vtkusers] Interaction with VTK window

subin supersub at ccea.zju.edu.cn
Sun Oct 19 06:30:14 EDT 2003


hi all:
    Here is my program. No messagebox appeared. But why?
----------------------------
good luck !
      subin ^_^


----- Original Message ----- 
From: "subin" <supersub at ccea.zju.edu.cn>
To: <vtkusers at vtk.org>
Sent: Sunday, October 19, 2003 4:24 PM
Subject: Re: [vtkusers] Interaction with VTK window


> hi:
>     There is no any MessageBox appear in my program when left button is down or up . I can't find out the problem. Can anybody give me a sample?
> ----------------------------
> good luck !
>       subin ^_^
> 
> 
> ----- Original Message ----- 
> From: "de Boer Ingo" <I.deBoer at polytec.de>
> To: "subin" <supersub at ccea.zju.edu.cn>; <vtkusers at vtk.org>
> Sent: Monday, October 13, 2003 8:11 PM
> Subject: AW: [vtkusers] Interaction with VTK window
> 
> 
> > I'm going to write a program with VTK in MFC. I don't know how to interact with the VTK window.
> > If anyone can show me how to do it or show me some examples?
> Make your own "vtkMyInteractorStyle" based on e.g. vtkInteractorStyleTrackballCamera.
> Like this:
> 
> #include "vtkInteractorStyleTrackballCamera.h"
> 
> class vtkMyInteractorStyle : public vtkInteractorStyleTrackballCamera
> {
> public:
> static vtkMyInteractorStyle *New();
> 
> void OnLeftButtonDown();
> void OnLeftButtonUp();
> 
> protected:
> vtkMyInteractorStyle();
> };
> 
> 
> vtkStandardNewMacro(vtkMyInteractorStyle);
> 
> vtkMyInteractorStyle::vtkMyInteractorStyle() : vtkInteractorStyleTrackballCamera()
> {
> }
> 
> void vtkMyInteractorStyle::OnLeftButtonDown()
> {
>   AfxMessageBox("left button down");
> }
> void vtkMyInteractorStyle::OnLeftButtonUp()
> {
>   AfxMessageBox("left button up");
> }
> 
> Add the interactor to your renderer, like
> m_pvtkWin32RenderWI->SetInteractorStyle(m_pvtkMyInteractorStyle);
> 
> greets
>   Ingo
> NŠz½UŠ²ž´jyzž‰y…A¶þ–Š­›‰þ}¢Â²’¹®þ¹®†Ûiÿ?Âûd¢¸?™¨¥™??-ŠwèþûdºÇ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleMFC.rar
Type: application/octet-stream
Size: 55079 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20031019/4fcc1e76/attachment.obj>


More information about the vtkusers mailing list