Win32 C++ console clearing screen without blinking

后端 未结 3 710
执笔经年
执笔经年 2021-02-10 02:58

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:43

    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

提交回复
热议问题