[vtkusers] vtk application on Document/View (MDI) pattern.

de Boer Ingo I.deBoer at polytec.de
Wed Oct 27 10:35:01 EDT 2004


Hi,

use

this->renWin->SetParentId(this->GetParent()->GetSafeHwnd());
this->renWin->SetWindowId(this->GetSafeHwnd());

instead of
this->renWin->SetParentId(this->m_hWnd);

greets
  Ingo


---
Dr.-Ing. Ingo H. de Boer

Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax  : ++49 7243 604 255
  
-----Original Message-----
 
Dears,
 
I'm using VC++ 2003 to construct my vtk application on Document/View (MDI) pattern.
I'm using in Create event in CView class follow code:
 
BOOL C3DView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
       // TODO: Add your specialized code here and/or call the base class
    this->renWin->AddRenderer(this->ren);
    this->renWin->SetParentId(this->m_hWnd);
    this->iren->SetRenderWindow(this->renWin);
              
    return CView::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
 
And vtk render window is being created out of CchildFrame client area. It is creating a separeted/duplicated render window of Cview in CchildFrame.
Can someone help me solve this problem ?
 
Thanks
 
Luis Alberto
55 11 8184 8444
55 11 3744 9965
l.a.pereira at uol.com.br
lapereira_br at hotmail.com
lalberto at stefanini.com.br
 
 



More information about the vtkusers mailing list