<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thank you Richard for giving good entry point, with vtkREnderWindow and SetParentId.<div><br></div><div>My scene scenario is same as yours, I'm not strict on staying in c++, letting all the VTK stuffs to happen </div><div>at C++ level and copy the content buffer to parent object is fine with me. Frankly speaking, failure of construing </div><div>the project is due to the fact <span style="font-size: 12pt;">of my poor grasp of VC++ template project organization. </span></div><div><br></div><div>To be specific if I add MyForm.h into PickingArea.cxx example compiler complains about all the things in MyForm.h</div><div>file which is not supposed to be:</div><div>e.g. Error<span class="Apple-tab-span" style="white-space: pre;"> </span>4<span class="Apple-tab-span" style="white-space: pre;"> </span>error C2653: 'System' : is not a class or namespace name<span class="Apple-tab-span" style="white-space: pre;"> </span>D:\...............\ENGINES\VTK_61_BUILD_EXAMPLES\Cxx\Picking\MyForm.h<span class="Apple-tab-span" style="white-space: pre;"> </span>7<span class="Apple-tab-span" style="white-space: pre;"> </span>1<span class="Apple-tab-span" style="white-space: pre;"> </span>AreaPicking</div><div><br></div><div>Although it has got nothing to do with VTK I'll appreciate your little push on that.</div><div><br></div><div>Regards,<br><br><div><hr id="stopSpelling">Date: Wed, 11 Jun 2014 13:54:51 +0100<br>Subject: [vtkusers] How to embed VTK rendering context into Windows Form<br>From: richard.whitehead@vivosight.com<br>To: vtkusers@vtk.org; sonyablade2010@hotmail.com<br><br><div dir="ltr"><div><br></div><div>Sonya,</div><div><br></div><div>The main thing to know is that you can get your app working in the "normal" VTK way using a vtkRenderWindow, and then later you can call SetParentId() on the render window, passing a window handle, to get VTK to draw into any window you want rather than into a pop-up window.<br>
</div><div><br></div><div>Personally I have created my app in C# and have a C++ DLL doing all the VTK stuff, but this requires quite a bit to get started. MFC is pretty old technology and difficult to get right, but if you want to stay entirely in C++ then you either use MFC or some other framework such as Qt. It does not matter as far as VTK is concerned, all it takes is a window handle.<br>
</div><div><br></div><div>Richard</div><br clear="all"><div><br></div>-- <br><div dir="ltr"><p style="color:rgb(80,0,80);font-family:Calibri;"><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;">Richard Whitehead </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143);">–</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;"> Senior Imaging Engineer</span></p>
<p style="color:rgb(80,0,80);font-family:Calibri;"><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143);">Michelson Diagnostics Ltd</span></b></p><p style="color:rgb(80,0,80);font-family:Calibri;">
<b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143);">M:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;"> +44 (0)7905 955276 </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143);">T:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;"> +44 (0)20 8308 1695</span></p>
<p style="color:rgb(80,0,80);font-family:Calibri;"><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143);">E: </span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(0,176,240);"><a href="mailto:richard.whitehead@vivosight.com" style="color:rgb(17,85,204);" target="_blank"><span style="color:rgb(0,176,240);">richard.whitehead@vivosight.com</span></a></span><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;"> </span><b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(146,39,143);">W:</span></b><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;"> </span><span lang="EN" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(0,176,240);"><a href="http://www.vivosight.com/" style="color:rgb(17,85,204);" target="_blank"><span style="color:rgb(0,176,240);">www.vivosight.com</span></a></span></p>
<p style="color:rgb(80,0,80);font-family:Calibri;"><br></p><p style="color:rgb(80,0,80);font-family:Calibri;"><a href="http://www.vivosight.com/" target="_blank"><span style="color:windowtext;text-decoration:none;"><img src="https://sites.google.com/a/vivosight.com/logo/_/rsrc/1361922206747/home/VivoSight.png" border="0"></span></a></p>
<p style="color:rgb(80,0,80);font-family:Calibri;"><br></p><p style="color:rgb(80,0,80);font-family:Calibri;"></p><p style="color:rgb(80,0,80);font-family:Calibri;">
<span style="font-size:7.5pt;font-family:Arial,sans-serif;color:gray;">Michelson Diagnostics Ltd, 1 Grays Farm Production Village, Grays Farm Road, Orpington, Kent BR5 3BD, UK</span></p><p style="color:rgb(80,0,80);font-family:Calibri;">
<span style="font-size:7.5pt;font-family:Arial,sans-serif;color:gray;">Registered Office: 3 Shearwater, Maidstone, ME16 0DW. Registered in England No. 5732681</span></p></div>
</div></div></div> </div></body>
</html>