[vtkusers] Medical3.cxx in MFC

Paul Tait paul at opes.com.au
Mon Jun 14 20:46:28 EDT 2004


On a slightly related issue

How would you go about grafting VTK into an existing MFC application. The
VTK window wouldn't be part of the main apps window, it would float next to
it or whereever the user placed it (dual monitor setup is being used). What
class would you derive or include the VTK window from/in.
I'm using CFrameWnd

Paul

----- Original Message ----- 
From: "de Boer Ingo" <I.deBoer at polytec.de>
To: "paulus joo" <paulusjoo at hotmail.com>; <vtkusers at vtk.org>
Sent: Monday, June 14, 2004 10:35 PM
Subject: RE: [vtkusers] Medical3.cxx in MFC


>
> 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();
> > }
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.705 / Virus Database: 461 - Release Date: 6/12/2004




More information about the vtkusers mailing list