<HTML><HEAD>
<STYLE><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></STYLE>
</HEAD>
<BODY class=hmmessage dir=ltr>
<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="font-color: black"><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=stopSpelling>
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 .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 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></BODY></HTML>