Win32 C++ console clearing screen without blinking

后端 未结 3 1454
挽巷
挽巷 2021-02-10 03:14

I\'ve seen some console games where the screen refreshes/clears itself without the annoying blinking. I\'ve tried numerous solutions, here\'s what I got as of now:



        
3条回答
  •  孤城傲影
    2021-02-10 03:30

    You want to do the equivalent of double buffering. Using CreateConsoleScreenBuffer and SetConsoleActiveScreenBuffer api calls, you can modify an offscreen buffer, then switch buffers, like we used to in the bad old days :) Here's an article that explains how: http://msdn.microsoft.com/en-us/library/windows/desktop/ms685032%28v=vs.85%29.aspx

提交回复
热议问题