[vtkusers] Re: VC6 + MFC: and recent Nightly

Nigel Nunn nNunn at ausport.gov.au
Tue Sep 12 04:58:36 EDT 2000

Hi Maurizio,

I just rebuilt our VC++/MFC application with the nightly: 
  Program:   Visualization Toolkit 
  Module:    $RCSfile: vtkVersion.h,v $ 
  Language:  C++ 
  Date:      $Date: 2000/09/09 20:11:09 $ 
  Version:   $Revision: 1.625 $ 
All looks good so far.  The nightlies looked unstable earlier that week, 
so there may have been problems in your revision 1.622 (Sep 6).  If 
you get the same problems with the current nightly, try building the 
new version of Sample, $:\vtk\Sample\Sample.dsw.  This demo MFC app
has been brought up to date, and there are a few significant changes.  
Most importantly, the vtkHandleMessage call has been replaced with 
vtkHandleMessage2, and 'o' for object mode in the default interactor 
has been reworked to use 'a' for actor mode.  'c' still switches back 
to camera mode, 'j'=joystick and 't'=trackball. 
>From $:\vtk\Sample\vtkMFCRenderView.cpp: 
// Define our own event handler here
LRESULT vtkMFCRenderView::WindowProc( ... )
  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(           // <-- changed 
                 message, wParam, lParam,  
  return vtkMFCView::WindowProc(message, wParam, lParam); 
Maurizio Turatti [mturatti at ais.it] wrote: 

> I have a problem with a VTK Nightly (date 2000/09/06, revision 1.622). 
> I'm using Visual C++ 6 and the MFC sample doesn't work. It compiles, 
> but when I run the program it suddenly close with a dr. Watson's error 
> message "Application Error", then the process remains idle in memory. 
> This happens also with another VTK program which uses MFC. The same 
> programs run fine with a 2000/05/29 VTK release, compiling with Visual 
> C++ 5.  I don't know if this behaviour is caused by VTK or VC6.
> Thanks,
> Maurizio

More information about the vtkusers mailing list