<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'><div><font style="font-size: 12pt;" face="Calibri" size="3">Thank You Richard your comments helped me a lot.</font></div><font style="font-size: 12pt;" face="Calibri" size="3">I managed to get it working on VC++2012, having set the Parent Id to a controls handle worked for me,</font><div><font face="Calibri">while I was expecting flickering on the control canvas, also not expecting the mouse inputs to be handled properly </font></div><div><font face="Calibri">between control </font><span style="font-family: Calibri; font-size: 12pt;">and VTK window (how VTK renderwindow message queue system is hooking itself into controls is still vague for  me),</span></div><div><font face="Calibri">but everything worked fine. <br></font><div><font face="Calibri"><br id="FontBreak"></font>Commenting on Python usage has really brought new dimension to my thought, since I was trying to achive </div><div>the GUI with VC++2012 features and where the VTK library will remain intact. It seems that  the Python is exactly </div><div>what I need. I think the hardest part will be integrating the python created interface and VTK in VC++2012. </div><div><br></div><div>I googled a bit to get familiar with usage/programming of Python for GUI but what I found was quite discouraging </div><div>with command-like interface poping out windows, probably I didn't find the right tutorial on net but I'll still continue to </div><div>look for them,<span style="font-size: 12pt;">I was expecting more like an IDE. </span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">I'll appreciate your entry points,</span></div><div><span style="font-size: 12pt;"><br></span></div><div><span style="font-size: 12pt;">Regards,</span></div><div><br><br><div><hr id="stopSpelling">From: richard.whitehead@vivosight.com<br>To: sonyablade2010@hotmail.com; vtkusers@vtk.org<br>Subject: Re: [vtkusers] How to embed VTK rendering context into Windows Form<br>Date: Wed, 11 Jun 2014 23:02:30 +0100<br><br>
<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>


<div dir="ltr">
<div style="FONT-SIZE:12pt;FONT-FAMILY:'Calibri';COLOR:#000000;">
<div>Sonya,</div>
<div> </div>
<div>It sounds like you are mixing C++ with C++ .NET (CLR), which are different 
languages.  In principle they should work together (C++ CLR is often used 
as a “bridge” between pure C++ and other .NET languages such as C#).  If 
you are struggling to get started then I think this is going to give you a lot 
of trouble, C++ CLR I would consider to be an “expert’s” language, and writing 
in multiple languages is always asking for trouble.</div>
<div>I would advise you to stick purely to C++ if at all possible.  I have 
not used Qt, but it seems that VTK integrates well with Qt.  Qt is a 
framework for making user interfaces – the same job that MFC does – but is 
cross-platform (i.e. it will work on Apple as well as Windows), and it is more 
oriented towards visual and imaging programs. </div>
<div> </div>
<div>Another off-the-wall suggestion for you to think about:  have you 
considered writing in python rather than C++?  VTK ships with python 
wrappers – in other words, python versions of all the classes.  These are 
produced automatically so they should all be up-to-date.  A lot of the 
examples are in python.  You can make user interfaces in python.  
Python is considered a much easier language to learn than C++ and you won’t have 
all the mess with templates and smart pointers.  It may be slightly less 
efficient but this is probably not important at all.  Just an idea.</div>
<div> </div>
<div>Hope this helps.  I’m away tomorrow (Thursday) so I won’t reply again 
until Friday!</div>
<div> </div>
<div>Richard</div>
<div> </div>
<div> </div>
<div> </div>
<div style="FONT-SIZE:small;TEXT-DECORATION:none;FONT-FAMILY:"Calibri";FONT-WEIGHT:normal;COLOR:#000000;FONT-STYLE:normal;DISPLAY:inline;">
<div style="FONT:10pt tahoma;">
<div> </div>
<div style="BACKGROUND:#f5f5f5;">
<div style=""><b>From:</b> <a title="sonyablade2010@hotmail.com" href="mailto:sonyablade2010@hotmail.com">Sonya Blade</a> </div>
<div><b>Sent:</b> Wednesday, June 11, 2014 10:02 PM</div>
<div><b>To:</b> <a title="richard.whitehead@vivosight.com" href="mailto:richard.whitehead@vivosight.com">Richard Whitehead</a> </div>
<div><b>Subject:</b> RE: [vtkusers] How to embed VTK rendering context into 
Windows Form</div></div></div>
<div> </div></div>
<div style="FONT-SIZE:small;TEXT-DECORATION:none;FONT-FAMILY:"Calibri";FONT-WEIGHT:normal;COLOR:#000000;FONT-STYLE:normal;DISPLAY:inline;">
<div dir="ltr"><font face="Comic Sans MS">Hi Richard,</font> 
<div><font face="Comic Sans MS"><br></font></div>
<div><font face="Comic Sans MS">I'll be grateful if you can do 
that,</font></div>
<div><font face="Comic Sans MS">I do absolutely nothing other than adding new 
MyForm item (which is visual control) to the existing </font></div>
<div><font face="Comic Sans MS">
<div>AreaPicking.cxx example which originally ships with VTK examples. 
Furthermore I do have to turn on the CLR support </div>
<div>under the Solution properties-> C/C++ -> Code Generation, where whole 
mess begins.</div>
<div> </div>
<div>Probably I shouldn't create the form that way at all?</div>
<div> </div>
<div>#include <vtkVersion.h></div>
<div>#include <vtkSmartPointer.h></div>
<div>#include <vtkPoints.h></div>
<div>#include <vtkXMLPolyDataWriter.h></div>
<div>#include <vtkPolyData.h></div>
<div>#include <vtkCellArray.h></div>
<div>#include <vtkPolyDataMapper.h></div>
<div>#include <vtkActor.h></div>
<div>#include <vtkRenderWindow.h></div>
<div>#include <vtkRenderer.h></div>
<div>#include <vtkRenderWindowInteractor.h></div>
<div>#include <vtkInteractorStyleRubberBandPick.h></div>
<div>#include <vtkInteractorStyleTrackballCamera.h></div>
<div>#include <vtkInteractorStyleTrackball.h></div>
<div>#include <vtkAreaPicker.h></div>
<div>#include <vtkCallbackCommand.h></div>
<div>#include <vtkProp3DCollection.h></div>
<div>#include <MyForm.h>   // If comment out that line 
everything works normally in VTK way, spawns the console window and everything 
is fine.</div></font>
<div> </div>
<div>Regards,</div>
<div> </div>
<div>
<hr id="ecxstopSpelling">
From: richard.whitehead@vivosight.com<br>To: 
sonyablade2010@hotmail.com<br>Subject: Re: [vtkusers] How to embed VTK rendering 
context into Windows Form<br>Date: Wed, 11 Jun 2014 21:36:55 +0100<br><br>
<style><!--
.ExternalClass .ecxexternalclass .ecxhmmessage p {
padding:0px;
}

.ExternalClass .ecxexternalclass body.ecxhmmessage {
font-size:12pt;
font-family:calibri;
}


--></style>

<div dir="ltr">
<div style="FONT-SIZE:12pt;FONT-FAMILY:'Calibri';COLOR:#000000;">
<div>Sonya,</div>
<div> </div>
<div>It sounds like you have not #included all the header files it needs to 
understand you code, but I don’t really have enough information to help beyond 
that.  You could send some code...  but I probably won’t get to look 
at it until Friday.</div>
<div> </div>
<div>Richard</div>
<div>
<div style="FONT-SIZE:small;TEXT-DECORATION:none;FONT-FAMILY:"Calibri";FONT-WEIGHT:normal;COLOR:#000000;FONT-STYLE:normal;DISPLAY:inline;"><span style="FONT-SIZE:7.5pt;FONT-FAMILY:arial,sans-serif;COLOR:gray;"></span></div></div></div></div></div></div></div></div></div></div></div></div></div>                                     </div></body>
</html>