<div><strong>Hi, vtkers,</strong></div>
<div><strong>&nbsp;</strong></div>
<div><strong>I have met the error in new vtkMFCWindow, which&nbsp;made me&nbsp;very confused.</strong></div>
<div><strong>&nbsp;</strong></div>
<div><strong>I build a project totally the same as the example &quot;vtkDlg&quot; as I think.</strong></div>
<div><strong>It&#39;s bulit successfully, however, when I debug it until&nbsp;the beakpoint</strong></div>
<div><strong>&quot;this-&gt;pvtkMFCWindow = new vtkMFCWindow(this-&gt;GetDlgItem(IDC_PICTURE_DCM));&quot;</strong></div>
<div><strong>and</strong> </div>
<div>&quot;</div>
<div>vtkMFCWindow::vtkMFCWindow(CWnd *pcWnd)<br>{<br>&nbsp; this-&gt;pvtkWin32OpenGLRW = NULL;</div>
<div>
<p>&nbsp; // create self as a child of passed in parent<br>&nbsp; DWORD style = WS_VISIBLE | WS_CLIPSIBLINGS;<br>&nbsp; if(pcWnd)<br>&nbsp;&nbsp;&nbsp; style |= WS_CHILD;<br>&nbsp; BOOL bCreated = CWnd::Create(NULL, _T(&quot;VTK-MFC Window&quot;),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; style, CRect(0, 0, 1, 1), 
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pcWnd, (UINT)IDC_STATIC);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong> //The system break down here</strong></p>
<p>&nbsp; SUCCEEDED(bCreated);</p>
<p>&nbsp; // create a default vtk window<br>&nbsp; vtkWin32OpenGLRenderWindow* win = vtkWin32OpenGLRenderWindow::New();<br>&nbsp; this-&gt;SetRenderWindow(win);<br>&nbsp; win-&gt;Delete();</p>
<p>}</p></div>
<div>&quot;</div>
<div>&nbsp;</div>
<div><strong>Can anyone met this? I will be very appreciated if you tell me how to solve it.</strong><br clear="all"><br>-- <br>Best wishes,<br>Chris </div>