Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delaying procedures 1

Status
Not open for further replies.

zz141

Programmer
Aug 23, 1999
2
TR
how can i delay procedures? i want to sloa down graphical output so that it can be followed by the user.<br>
i had the delay function in turbo c, but there is no such thing in c++ builder<br>
can someone help me out?
 
You could use the Windows SetTimer API call to start a timer like this: SetTimer(hwnd, 1, 100, NULL) for a timer interval of 0.1 second (100 milliseconds). See below for details.<br>
<br>
UINT SetTimer(hwnd, idTimer, uTimeout, tmprc)<br>
<br>
HWND hwnd; /* handle of window for timer messages */<br>
UINT idTimer; /* timer identifier */<br>
UINT uTimeout; /* time-out duration in millisecs*/<br>
TIMERPROC tmprc; /* instance address of timer procedure NULL if you want WM_TIMER messages */<br>
<br>
Then all your program has to do is repond to the WM_TIMER messages it recieves. When it is done with the timer, call KillTimer(hwnd, 1) to kill the above #1 timer.....<br>
I hope this helps...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top