Redraw problems with OpenGL and MFC

I am having refresh/drawing problems with a program that I have been writing on ATI cards. Problem doesn’t seem to appear on NVidia cards, or when I force the program to use the MS software implementation of OpenGL.

In additional, the program returns an error code of 127, using GetLastError(), after calling SetPixelFormat (returns successfully). Error 127 is defined as “Procedure could not be found.” Again, this doesn’t happen on NVidia based systems or when using Microsoft’s OpenGL, only when using ATI OpenGL ICD.

I created a sample MFC application located at:

(MSVC++ 6.0, NT4.0 SP6)