<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-7">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello,</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><FONT face=Arial
size=2></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial size=2>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 </FONT><FONT face=Arial size=2>an interactor class derived
from vtkWin32RenderWindowInteractor in which I have overidden methods like
OnLButtonDown, etc. For example, my OnLButtonDown method does only the
following:</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><FONT face=Arial
size=2></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT color=#0000ff>void</FONT>
MyInteractor::OnLButtonDown (HWND wnd, UINT nFlags, <FONT
color=#0000ff>int</FONT> X, <FONT color=#0000ff>int</FONT>
Y)</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>{</FONT></DIV>
<DIV><FONT face=Arial size=2> HWND hparent = (HWND)<FONT
color=#0000ff>this</FONT>->GetRenderWindow()->GetGenericParentId();</FONT></DIV>
<DIV><FONT face=Arial size=2> ::SendMessage(hparent, WM_LBUTTONDOWN,
0, MAKELPARAM(X, Y));</FONT></DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><FONT face=Arial
size=2></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial size=2>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?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>And I repeat once more my other question: does
anyone know how to render a gradient background on a vtk render
window?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks again</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Kostas</FONT></DIV></BODY></HTML>