From https://blog.csdn.net/niusiqiang/article/details/43116153
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: https://www.cnblogs.com/redips-l/p/9039555.html
Read More:
- Solution of flash screen caused by OpenGL in MFC environment
- The solution of flicker and no refresh caused by OpenGL + MFC
- 1 vs20152017 + OpenGL to configure and draw a white rectangle
- 0xc0000005: an access conflict occurred while reading location 0x00000020
- Simple configuration of glfw + glad in vs2015 OpenGL development environment
- Solution to the problem that OpenGL can’t find glew32.dll in vs2019
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- MFC flash screen solution
- Beginners of OpenGL (1): preparation
- The tutorial and difference of glew, glfw, glad and freeglut
- Vc2010 configuring OpenGL environment
- The solution of using OpenGL’s Glu Library in qt5.2 under win7
- OpenGL configuration under CodeBlocks in Ubuntu
- Vs2015 OpenGL environment configuration
- The solution of OpenGL not displaying normally in win7 system
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- C++ Error: allocating an object of abstract class type
- Wrong classification of Python — assertion cur_ Target is greater than or equal to 0 and cur_ Target is less than n_ classes failed
- Using glut in CodeBlocks
- OpenGL error getting glgeterror ()