Re: [wxVTK] [Fwd: wxVTK: MSW compilation vs. resizing problem]
Brought to you by:
malat
From: Johnny C. N. I. <jn...@mc...> - 2005-04-20 14:58:45
|
Hi, I'm afraid I won't be much help here. My patch consisted of adding the=20 following three lines in wxVTKRenderWindowInteractor::OnPaint(): #ifdef __WXMSW__ RenderWindow->SetParentId(reinterpret_cast<void*>(this->GetParent()->GetH= WND())); #endif //__WXMSW__ I didn't touch wxVTKRenderWindowInteractor::OnSize() at all. John mma...@ny... wrote: > [Forwarding to wxVTK users] >=20 > John could you comment on your patch ? Which wx did you used ? I have > also laying around patch from Alexis H. Rivera-Rios which apparently > changed the function OnSize to something like: >=20 > void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent > &event) > { >=20 > GetClientSize(&a,&b); > int *size3; > size3 =3D RenderWindow->GetSize(); =20 > if (size3[0]=3D=3D0 && size3[1]=3D=3D0) //// <-- new code > { > UpdateSize(a,b); > } > else > { > UpdateSize(size3[0], size3[1]); > } >=20 > if (!Enabled)=20 > { > return; > } >=20 > #if (VTK_MAJOR_VERSION =3D=3D 4 && VTK_MINOR_VERSION > 0) > InvokeEvent(vtkCommand::ConfigureEvent, NULL); > #endif > //this will check for Handle > Render(); > } >=20 >=20 > It seems wxNO_FULL_REPAINT_ON_RESIZE only affect windows (not my primar= y > plateform). I was also looking at solution like vtkFlRenderWindow and > there seems to be some tricks to consider to properly set the size of > the renderwindow. >=20 > I'll have to investigate before applying another patch. >=20 > sorry for the troubles, > Mathieu >=20 > -------- Original Message -------- > Subject: wxVTK: MSW compilation vs. resizing problem > Date: Wed, 20 Apr 2005 15:19:55 +0100 > From: Reinhold F=FCreder <R.F...@ex...> > To: <mat...@cr...> >=20 > Dear Mathieu, >=20 > When updating to your latest version (0.8) of wxVtk (from 0.7) I am > experiencing a compilation problem (and still the resizing problem). >=20 > During compilation MSVC++ 6 (Windows 2k) using wxWidgets version from > August 2003 (in between 2.4.2 and 2.5.0) and VTK from end of February > this year it reports the following error message > "...\wxVTK\wxVTKRenderWindowInteractor.cpp(327) : error C2039: 'OnSize' > : is not a member of 'wxWindow' > D:\CVS\wxWindows\include\wx/msw/window.h(53) : see declaration > of 'wxWindow'" >=20 > This is HERE: > ---- > void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent &event) > { > //this is also necessary to update the context on MSW=20 > #ifdef __WXMSW__ > wxWindow::OnSize(event); //wxNO_FULL_REPAINT_ON_RESIZE ?? <<<< HERE > !!! > #endif > ... > ---- >=20 > If I comment it out the patch provided by John Norris concerning the > resizing problems under wxMSW does not work (consequently?). >=20 > Do I miss something? I am still using the old CMake files as for versio= n > 0.7. And also in the CVS head of wxWidgets I cannot find a > wxWindow::OnSize() method on the first view. Should the resizing event > be reproduced/recreated in a different way to solve the resizing > problem? Or is this not linked? --=20 John Norris Research Programmer Center for Simulation of Advanced Rockets http://www.uiuc.edu/ph/www/jnorris |