开发平台(Platform): (Ex: Win10, Linux, ...)
MFC
想让图形根据给予的数据连续更新画面
每一个 frame 之间希望有 interval
看起来才连续动的感觉
试过 thread, 更新画面的时候, 还是没办法动 UI, UI 是冻结的
void delay()
{
// 方法1
this_thread::sleep_for(10ms);
// 方法2
int nextTime = time(0) + secs;
while (time(0) < nextTime);
}
thread testThread(delay);
testThread.detach();
请问我那边做错了吗
有翻到很古早很古早的 sample
是用 ON_WM_TIMER() 做的
运作起来就很顺了
请问这两者之间有什么差异呢
谢谢
EDIT1
完整 code
https://pastebin.com/DEUsiG25