[vtkusers] vtkHandleMEssage2

Louis-Jacques Lalonde lalond01 at gel.ulaval.ca
Tue Oct 15 17:29:03 EDT 2002


 Hi !

I'm using VTK 4.0 and Visual Studio 6 to code an interface using MFC and
VTK.  Everything is fine so far except that when I display something in my
VTK screen my MFC toolbar doesnt update.  I believe it has something do to
with this callback.  Any way I can tell the function, once the interactor
is initialized I dont want to always call vtkHandleMessage2.  Am I wrong
or it seems that this fonction is catching all update message even the one
of the toolbar ?

When the interactor is not initialized (when I just open my program and do
nothing my toolbar is updating correctly)

Thanks a lot !

LRESULT CInterface3DView::WindowProc(UINT message, WPARAM wParam, LPARAM
lParam) 
{
	switch (message)
    {
    //case WM_PAINT:
	case WM_LBUTTONDOWN: 
    case WM_LBUTTONUP: 
    case WM_MBUTTONDOWN: 
    case WM_MBUTTONUP: 
    case WM_RBUTTONDOWN: 
    case WM_RBUTTONUP: 
    case WM_MOUSEMOVE:
    case WM_CHAR:
    case WM_TIMER:
      if (this->Interactor->GetInitialized())
	{
	return vtkHandleMessage2(this->m_hWnd, message, wParam, lParam, 
				 this->Interactor);
	}
      break;
    }

	return CView::WindowProc(message, wParam, lParam);
}


-------------------------
Courriel Web gelgif
Département de génie électrique et de génie informatique
Université Laval
http://www.gel.ulaval.ca



More information about the vtkusers mailing list