[vtkusers] questions on render window #2

Konstantinos Iatridis kiatri at itech-soft.com.fr
Tue Aug 4 04:44:15 EDT 2009


Hello,

in a previous post I have asked about a way to handle windows events of a render window independent of vtk and I would like to offer some additional information. My vtk render window is created on top of a normal system window provided by a .net application. The render window is associated with an interactor class derived from vtkWin32RenderWindowInteractor in which I have overidden methods like OnLButtonDown, etc. For example, my OnLButtonDown method does only the following:

void MyInteractor::OnLButtonDown (HWND wnd, UINT nFlags, int X, int Y)
{
   HWND hparent = (HWND)this->GetRenderWindow()->GetGenericParentId();
   ::SendMessage(hparent, WM_LBUTTONDOWN, 0, MAKELPARAM(X, Y));
}

The purpose is to send back the windows events to the parent .net form. Under vtk v4.2 this approach worked. Under vtk 5.2 and 5.4 it leads occasionally to run time errors. Does anyone have an idea why this doesn't work?

And I repeat once more my other question: does anyone know how to render a gradient background on a vtk render window?

Thanks again

Kostas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090804/7fe6e534/attachment.htm>


More information about the vtkusers mailing list