[vtkusers] Re: Interactor not working as it was: See vtkHandleMessage2

Nigel Nunn nNunn at ausport.gov.au
Thu Feb 15 22:48:12 EST 2001


Hi Justin, 
The MFC Sample that comes with v3.2 is different to 
earlier versions. Construction and initialization is 
different, as is the call which processes selected 
Win32 messages.  Note the call to vtkHandleMessage2: 
 
 
// Define our own event handler here 
LRESULT vtkMFCRenderView::WindowProc(UINT , WPARAM , LPARAM ) 
{ 
  switch (message) 
    { 
    //NB: Customize behavior by intercepting messages: 
    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 vtkMFCView::WindowProc(message, wParam, lParam); 
} 




More information about the vtkusers mailing list