Solution of OpenGL window flicker in MFC framework

This is because OpenGL has its own function glClear to refresh the background, so Windows should not be allowed to refresh the background of the window. Otherwise, when the window needs to be redrawn, Windows automatically sends WM_ERASEBKGND first, and the default handler uses a white background brush. When the background color used by OpenGL is not white, there is a flicker of white in the drawing. This is especially true when doing animation.
Therefore, the configuration step is missing one step. Activate the message of WM_ERASEBKGND in the MFC program after the configuration step is completed
Message processing of the parent window class is disallowed in the function. It simply returns a TRUE. Return CView::OnEraseBkgnd(PDC)
You should now change this to return TRUE to solve the splash screen problem.

Reproduced in:

Read More: