Since OpenGL has its own background refresh function, glClear, Windows should not be allowed to refresh a window background. 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.
Activate the WM_ERASEBKGND message handler in the MFC program to disable message processing of the parent window class, and simply return a TRUE. Return CView::OnEraseBkgnd(PDC). Now change this to return TRUE. This will solve the flash screen problem.
Read More:
- The solution of flicker and no refresh caused by OpenGL + MFC
- MFC flash screen solution
- Solution of OpenGL window flicker in MFC framework
- OpenGL result white screen solution
- GPU hardware acceleration related problems, solve flash screen
- Caused by: java.net.SocketException : connection reset or caused by: java.sql.SQLRecoverableException solve
- Solution of no response of progress bar in MFC program
- Why does the result screen flash when visual studio runs the program?
- Solution to page scroll bar failure caused by opening secondary spring frame in Ant Design modal form
- Solution to error reporting on the client caused by adding fields on the CXF server
- Installing flash in MAC environment
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- A series of problems in configuring OpenGL development environment in vs2015
- Vs2013 error msb8031 solution today ran a MFC program, found that the error: error msb8031: building an MFC project for a non-U
- Simple configuration of glfw + glad in vs2015 OpenGL development environment
- On the configuration of OpenGL Red Book eighth edition environment in vs2013
- The solution of console flash in C + +
- Vc2010 configuring OpenGL environment
- How to solve the problem that the output results of C + + program written in VS2010 flash by
- The problem of flash back by pressing enter window when debugging or executing program in Visual Studio C