[vtkusers] About Win32RenderWindowInteractor and MFC
dahuang
dahuang at skltr2.mech.pku.edu.cn
Tue Dec 10 10:33:11 EST 2002
hi,vtkusers,
I am using MFC to develop a vtk program.But when using vtkWin32RenderWindowInteractor to perform interaction, I am puzzled of how to deal with the message mapping.
I used SetInstallMessageProc(0), as the manual said, to prevent the message from being intercepted by vtkWin32RenderWindowInteractor.But in MFC, I find my own message handling function does not work, either.How to solve this problem? If anyone has written similar codes before, would you like to share it with me?
Part of my codes:
CMdiView::CMdiView()
{
this->aRenderer = vtkRenderer::New();
this->renWin = vtkWin32OpenGLRenderWindow::New();
this->iren = vtkWin32RenderWindowInteractor::New();
this->iren->SetInstallMessageProc(0);
this->bone = vtkActor::New();
this->aCamera = vtkCamera::New();
this->txtActor = vtkActor2D::New();
this->txtMapper = vtkTextMapper::New();
// this->pick = vtkPointPicker::New();
}
void CMdiView::OnLButtonUp(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CView::OnLButtonUp(nFlags, point);
AfxMessageBox("hehe");
}
Virtual message handler "OnLButtonUp" is added using ClassWizard.
Yours faithfully,
dahuang
dahuang at skltr2.mech.pku.edu.cn
2002-12-10
More information about the vtkusers
mailing list