[vtkusers] Win2000 MFC problem

pahsieh at usgs.gov pahsieh at usgs.gov
Sun Nov 12 03:03:27 EST 2000


I just got a PC with Win 2000. I am using VC++ 6.0.
I got the source code for VTK 3.1.2, built the dll and lib
files, and then built the Sample MFC/MDI application. Everything
built fine. However, when I ran the executable, I got an
access violation error (null pointer, I think). I tracked
the problem to the method

int vtkMFCRenderView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (vtkMFCView::OnCreate(lpCreateStruct) == -1)
          return -1;

    // TODO: Add your specialized creation code here
    this->RenderWindow->SetParentId(lpCreateStruct->hwndParent);
    this->RenderWindow->SetWindowId(this->m_hWnd);
// **Error occurs at the next line**
    this->RenderWindow->WindowInitialize();
    return 0;
}

When I commented out this->RenderWindow->WindowInitialize(), the
program seems to run fine. This also occurs with the nightly
source code of Nov 10.

Has anyone come across this problem and the proper way to fix it?
Thanks.

Paul






More information about the vtkusers mailing list