What version of VTK are you using?<br><br>You have built both 32 and 64-bit builds of VTK?<br><br>For 64-bit usage on Windows, definitely use VTK from CVS. There were several important fixes committed to CVS VTK that make 64-bit builds usable on Windows.
<br><br>HTH,<br>David<br><br><div><span class="gmail_quote">On 6/3/07, <b class="gmail_sendername">Dov Mayzlish</b> &lt;<a href="mailto:dov.mayzlish@philips.com">dov.mayzlish@philips.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br><font face="sans-serif" size="2">Hi,</font>
<br>
<br><font face="sans-serif" size="2">I&#39;m a vtk beginner, trying to embed
vtk image in my viewport.</font>
<br>
<br><font face="sans-serif" size="2">My code is something like this:</font>
<br>
<br>
<br><font color="blue" face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp;
this</font><font face="Courier New" size="2">-&gt;renWin = vtkRenderWindow::New();</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;iren
= vtkRenderWindowInteractor::New();</font>
<br><font color="blue" face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp;
this</font><font face="Courier New" size="2">-&gt;ren = vtkRenderer::New();</font>
<br><font face="Courier New" size="2">...</font>
<br>
<br>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;renWin-&gt;AddRenderer(</font><font color="blue" face="Courier New" size="2">
this</font><font face="Courier New" size="2">-&gt;ren);</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="#008000" face="Courier New" size="2">//
setup the parent window</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">void</font><font face="Courier New" size="2">*
hwnd = (</font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;Handle.ToPointer());
&nbsp; // (the class is a .NET UserControl)</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;renWin-&gt;SetParentId(hwnd);</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;iren-&gt;SetRenderWindow(</font><font color="blue" face="Courier New" size="2">
this</font><font face="Courier New" size="2">-&gt;renWin);
&nbsp; &nbsp; &nbsp; &nbsp;</font>
<br><font color="blue" face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp;
</font>
<br>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="#008000" face="Courier New" size="2">//
initialize</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;iren-&gt;Initialize();</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;ren-&gt;ResetCamera();</font>
<br>
<br>
<br><font face="sans-serif" size="2">When working 32bit, this works perfect.</font>
<br>
<br><font face="sans-serif" size="2">When working 64bit, an empty black window
is created, named &quot;Form1&quot; (instead of the name I gave it).</font>
<br>
<br><font face="sans-serif" size="2">When I comment out the lines (64bit)</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; //</font><font color="blue" face="Courier New" size="2">void</font><font face="Courier New" size="2">*
hwnd = (</font><font color="blue" face="Courier New" size="2">this</font><font face="Courier New" size="2">-&gt;Handle.ToPointer());</font>
<br><font face="Courier New" size="2">&nbsp; &nbsp; &nbsp; &nbsp; </font><font color="blue" face="Courier New" size="2">//this</font><font face="Courier New" size="2">-&gt;renWin-&gt;SetParentId(hwnd);</font>
<br><font face="Courier New" size="2">a new window with the correct name
appears with the correct actor, but the &quot;Form1&quot; window appears
as well.</font>
<br><font face="Courier New" size="2">Since I plan to embed the viewport
in a large application, I need the image to be in my existing viewport.</font>
<br>
<br><font face="Courier New" size="2">Does anyone have a suggestion what
could make only the 64bit build to fail to embed the image in my viewport?</font>
<br>
<br><font face="Courier New" size="2">Thanks,</font>
<br><span class="sg"><font face="Courier New" size="2">Dov</font>
<br></span><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br></blockquote></div><br>