我用 PrintWindow 做窗口录像,每次调用时窗口图像都会有很明显的迟滞;因为是录像,每秒钟要调用 20 多次 PrintWindow,被录像的窗口就特别卡。
看 MSDN 上有句话说:
“Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.”
以为是线程的问题,就单独开一个线程去调 PrintWindow,结果感觉没啥区别。