Thread: Pause a program
View Single Post
Old 08-25-2006, 04:33 AM  
KewinT
Registered User
 
Join Date: Aug 2006
Posts: 3
Pause a program

"I need to call a function every 1 second in my Windows (GUI) program. I have tried the following:


Code:
#include <windows.h>
...
while (true) {
Sleep(1000);
}This works, except it locks up the application between calls so nothing else can occur.

Does C++ (or the Windows API) have a built-in pause or timer function for this purpose? Thanks."
__________________
Content hosting - Fixed rate loans
KewinT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote