Code from the pipeline of MDI appllication which worked with 5.8. Need help upgrading it to 9.1

Hi Everyone,
I am working on a project which includes following code. This code was developed in vtk5.8 and now I am trying to make it work in vtk9.1. The code is compiling but it is not rendering anything. Can Anyone look at the code and let me know any specific reason.

this->ren = vtkRenderer::New();
this->renWin = vtkWin32OpenGLRenderWindow::New();
this->iren = vtkWin32RenderWindowInteractor::New();
this->Actor = vtkActor::New();

vtkPolyData* data = vtkPolyData::New();
vtkCellArray *polys = vtkCellArray::New();
vtkPoints *newPts = vtkPoints::New();

Internal code to fill newpts and polys with data is working fine*

this->ren->SetBackground(0.0, 0.0, 0.0);
this->ren->SetAmbient(1.0, 1.0, 1.0);

Why are you explicitly instantiating the derived classes vtkWin32OpenGLRenderWindow and vtkWin32RenderWindowInteractor? Why are you not using vtkRenderWindow and vtkRenderWindowInteractor? Also, “RemoveAllViewProps()” sure looks suspicious to me…

I am working on a MFC application that’s why I am using these.

void vtkViewport::RemoveAllViewProps ( void 

>  > <br><br>Remove all actors from the list of actors.<br><br> |
> - | - |

I don’t think you want to do that! Also check to make sure you are using the correct type of mapper - pMapper in your code.

pMapper is a DataSetMapper.