<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
_filtered {font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
_filtered {
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
/* Font Definitions */
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.emailstyle17
        {font-family:Arial;
        color:navy;}
span.EmailStyle18
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Try creating a new window in OnInitDialog()
and delete in ON_WM_DESTROY handler. You could also look at the example Examples\GUI\Win32\vtkMFC\vtkDLG.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>HTH</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>John.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> echinococcus Multilocularis
[mailto:lintworm2@yahoo.co.uk] <br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>15 October 2006</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>21:00</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b> John Platt<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [vtkusers]
vtkMFCWindow: new and delete problems</span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
<div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>I am building a dialog
based program, and not using SDI, nor MDI.</span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Thank you for your
response.</span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Sincerely,</span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-right:0cm;margin-bottom:12.0pt;margin-left:
36.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>Han</span></font></p>
</div>
<div>
<p class=MsoNormal style='margin-right:0cm;margin-bottom:12.0pt;margin-left:
36.0pt'><font size=3 face="Times New Roman"><span style='font-size:12.0pt'>-----
Original Message ----<br>
From: John Platt <jcplatt@dsl.pipex.com><br>
To: echinococcus Multilocularis <lintworm2@yahoo.co.uk><br>
Sent: </span></font>Sunday, 15 October, 2006 9:31:13 PM<br>
Subject: RE: [vtkusers] vtkMFCWindow: new and delete problems</p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>If you
are using the document view architecture, you would normally let the document
create the view through an appropriate document template. SDI & MDI
projects will do this automatically for you. If you look at a typical CView
derived class you will see that the constructor is protected preventing the
kind of operation you are attempting.</span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>HTH</span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'>John.</span></font></p>
<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=navy
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:72.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org
[mailto:vtkusers-bounces+jcplatt=dsl.pipex.com@vtk.org] <b><span
style='font-weight:bold'>On Behalf Of </span></b>echinococcus Multilocularis<br>
<b><span style='font-weight:bold'>Sent:</span></b> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>15 October 2006</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> </span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>16:15</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'><br>
<b><span style='font-weight:bold'>To:</span></b> vtkusers@vtk.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [vtkusers] vtkMFCWindow:
new and delete problems</span></font></p>
<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
<div>
<div>
<div>
<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hello,</span></font></p>
<div>
<div>
<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
I have restarted working with vtk, this time under windows, M$ VC++ 6.0. I have
vtk 5.0.2 installed, built in the release with symbols mode, on a windows 2000
machine. I want to use the MFC functionalities, and thus i looked into the
examples on MFC. I have started my own project and use the example to find the
nesecary steps.<br>
<br>
So far so good. However, when want to create a vtkMFCWindow in debug-mode, and
delete it later on, so like this:<br>
<br>
m_pMFCWindow = new
vtkMFCWindow(this->GetDlgItem(DISPLAYFRAME));<br>
delete m_pMFCWindow;<br>
<br>
I get a dialog telling me that a debug assertion failed. specifically it tells
me that it stops on:<br>
pHead->nBlockUsed == nBlockUsed<br>
<br>
Furthermore i get a warning:<br>
Warning: calling DestroyWindow in CWnd::~CWnd; OnDestroy or
PostNcDestroy in derived class will not be called.<br>
<br>
Again, all of this is only in debug mode. I know that i link the vtk library in
release mode w/ symbols on my program, can that be the problem? When i run my
program in Release mode, obviously i don't get the debug assertion failed
dialog. <br>
<br>
How do you create and destroy an object of the type vtkMFCWindow in a correct
way?<br>
<br>
TIA!<br>
<br>
Han</span></font></p>
</div>
</div>
</div>
<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
</div>
<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
Send instant messages to your online friends http://uk.messenger.yahoo.com </span></font></p>
</div>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
</div>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
Send instant messages to your online friends http://uk.messenger.yahoo.com </span></font></p>
</div>
</body>
</html>