![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Expert Programmer
|
Pause a program
I need to call a function every 1 second in my Windows (GUI) program. I have tried the following:
#include <windows.h>
...
while (true) {
Sleep(1000);
}Does C++ (or the Windows API) have a built-in pause or timer function for this purpose? Thanks. |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3
![]() |
This is what I got from a search on Win32 timer. This is a very common task, I am sure a cursory search of whatever docs you have, for whatever GUI framework you are using should show you its particular way of doing things.
|
|
|
|
|
|
#3 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Game_Ender++
AntiNinja--
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
I know sry, didnt read the entire post.
![]()
__________________
Pain is just weakness leaving the body.
|
|
|
|
|
|
#5 |
|
Expert Programmer
|
I found the instructions that link gave were a little too complicated. This tutorial was much easier to follow.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Language display in program | Prm753 | C++ | 3 | May 30th, 2006 5:45 PM |
| Creating a program to test a program | sixstringartist | C | 8 | Jan 21st, 2006 1:15 PM |
| The Option Button help | lpxxfaintxx | Visual Basic | 0 | Dec 3rd, 2005 11:22 AM |
| How do I pause the program without counter..? | boraciner | C++ | 17 | Nov 6th, 2005 3:04 PM |
| move program console window back | badbasser98 | C++ | 21 | Oct 18th, 2005 2:02 PM |