[vtkusers] Render window

Tuhin Sinha tk.sinha at vanderbilt.edu
Sun Mar 2 14:13:50 EST 2003


Hey Sepp,

  There was a thread on this a couple days ago relating to this, but in Linux.  
However, I think the basic principle is the same in both platforms.  In the 
Win32 API, you'll have to catch the WM_DESTROY event notification, and delete 
the vtkRenderWindow object when you get it.

To VTK users/developers,

  Regarding a default window handling procedure, what prevents VTK from 
implementing a flag that turns on/off window handling by the vtkRenderWindow 
object.  That is, if the flag is on, then in C++ the vtkRenderWindow object 
will catch the WM_DESTROY messages and invoke appropriate methods to delete 
the object.  Otherwise, if the flag is off, the responsibility of destroying 
the object is up to the user.  It seems weird that the vtkRenderWindow goes 
through all the trouble of creating the window, but then doesn't provide any 
functionality for handling its deletion.  Just a thought.

Tuhin

On Sunday 02 March 2003 12:19, Sepp^ Huber wrote:
> I'm currently developing an application using C++ & VTK. What I need to do
> is actually to close the render window created by the
> m_pRenderWindow->Render(); (m_pRenderWindow is a vtkRenderWindow object)
> from my program so that I can create a new one later on. Unfortunately I
> haven't been able to figure out how to do this. Probably somebody could
> help on this.
>
> Thanks in advance
> Sepp




More information about the vtkusers mailing list