[vtkusers] Re: Windows 2000 - Resize
Nigel Nunn
nNunn at ausport.gov.au
Wed Jun 14 10:23:53 EDT 2000
A few variations of the MFC "sample" exist. Each handles
interaction messages differently.
"Sample" is part of the self-installing precompiled ver 3.x.
"ugview2" still seems to ship with nightly download. (Why?)
"Sample" has this OnSize routine, which looks like it simply
reorders the calls you already make.
void vtkMFCRenderView::OnSize(UINT nType, int cx, int cy)
{
vtkMFCView::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
if (this->Interactor->GetInitialized())
{
this->Interactor->SetSize(cx,cy);
}
}
The "ugview2" version still seems to use the non-existant (??)
class, vtkWin32MappedInteractor, and its OnSize looks like this
void CVtkView::OnSize(UINT nType, int cx, int cy)
{
if (ren) iren->OnSize(this->m_hWnd,nType, cx, cy);
}
If you are using Vtk version 3 or later, try starting from
the example "Sample", not "ugview2".
Best wishes,
Nigel
> void CVtkView::OnSize(UINT nType, int cx, int cy)
> {
> this->m_Interactor->SetSize(cx, cy);
> this->m_Interactor->UpdateSize(cx, cy);
> CView::OnSize(nType, cx, cy);
> }
More information about the vtkusers
mailing list