multithreading in MFC OpenGL problem

I have the following problem in a project of mine. I anyone has seen it before and may offer help, I would apreeciate it a lot.
The application is based on the MFC SDI architecture. But, I have also created one more thread that performs non - stop rendering on the CView window. The code works fine on nVidia cards, but halts the system on ATI and Matrox ones (both on W98 and W2000NT). The problem occurs if the CView window is resized while in rendering. I perform no handling of the WM_SIZE and WM_SIZING messages, because my code on the rendering thread is something like the following:

ThreadEntryPoint()
{
Init OpenGL;

While(ReadyForOutput)
{
if(WindowSizeof(CView) != PreviousSize)
ResizeGL();
RenderScene();
if(WindowSizeof(CView) != PreviousSize)
ResizeGL();
}

Drop OpenGL;
//returns and exits application
}

void ResizeGL()
{
PreviousSize = WindowSizeof(CView);
glViewport(0, 0, PreviousSize.x, PreviousSizew.y );
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(…);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
}

The system is halted once you try! to resize the CFrameWindow, or once you disable(hide) a dockable toolbar - something that makes the CView enlarge per the size of the dock.
I remind you that the code works fine on all nVidia cards. I work in Visual C++ 6.0 and there aren’t many things you could check on the debug mode before the system crashes, so I believe that only developers that have already faced the problem will be able to help, but anyone may feel free to express his opinion.

Thank u