[vtkusers] Medical3.cxx in MFC

de Boer Ingo I.deBoer at polytec.de
Mon Jun 14 10:35:18 EDT 2004


Hi,

only call the pipe in the OnInitialUpdate() function and NOT
in the OnPaint/OnDraw... There, only call Render()...
Also, call "this->iren->Initialize()" in the OnInitialUpdate().
This leads to:

void CMedicalSDIView::OnDraw(CDC* pDC)
{
   CPaintDC dc(this); // device context for painting
 
  // TODO: Add your message handler code here
 
   CMedicalSDIDoc* pDoc = GetDocument();
   ASSERT_VALID(pDoc);
  this->renWin->Render();
}

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

> void CMedicalSDIView::OnDraw(CDC* pDC)
> {
>   CPaintDC dc(this); // device context for painting
> 
>  // TODO: Add your message handler code here
> 
>   CMedicalSDIDoc* pDoc = GetDocument();
>   ASSERT_VALID(pDoc);
> 
> 
>   if ( !this->iren->GetInitialized() )
>   {
>     CRect rect;
> 
>     this->GetClientRect(&rect);
>     this->iren->Initialize();
>     this->renWin->SetPosition(100,100);
> 
> this->renWin->SetSize(rect.right-rect.left-100,rect.bottom-rec
> t.top-100);
> 
>     this->aRenderer->ResetCamera();
>   }
> 
>   // Invoke the pipeline
>   Pipeline();
>   this->renWin->Render();
> }
 



More information about the vtkusers mailing list