开发者

a c++ timer is blocking my entire class?

开发者 https://www.devze.com 2023-02-25 16:23 出处:网络
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)

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 whol开发者_高级运维e 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!


You want to do a SetTimer call and either give it a pointer to a callback function, or respond to the WM_TIMER message that comes back.

0

精彩评论

暂无评论...
验证码 换一张
取 消