简体   繁体   English

一个C ++计时器阻止了我的整个课堂?

[英]a c++ timer is blocking my entire class?

i guess there is some reasonable and an easy solution. 我想有一些合理而简单的解决方案。 So for instance i have: 例如,我有:

INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{

time(2)

// anything else in the about class....

//return code

}

The problem is that the whole application almost freezes and i cannot do anything but "wait for the timer". 问题是整个应用程序几乎死机了,我只能做“等待计时器”的工作。 How can i make the timer runs irrespectively to any other operation? 如何使计时器与其他任何操作无关地运行? 10x! 10倍!

您要进行SetTimer调用,或者为它提供指向回调函数的指针,或者响应返回的WM_TIMER消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM