Hi,
currently i m using CPeriodic Timer in my application and its work fine. But now i want to stop timer whenever dialog is showing and start it again when dialog is dismissed. How can i?
savaj.....
Hi,
currently i m using CPeriodic Timer in my application and its work fine. But now i want to stop timer whenever dialog is showing and start it again when dialog is dismissed. How can i?
savaj.....
Isn't it just a case of calling Cancel() on your CPeriodic object when your dialog appears?
Symsource Ltd.
[url]www.symsource.com[/url]
hi KevinD
Thanx for reply..
How can i Resume timer remaining time???
Hi,
You have to calculate the time using TTime "HomeTime()"/"MicroSecondsFrom()" methods and re-request the timer event with the interval equivalent to time difference obtained by "MicroSecondsFrom()".
If you want something like "pause", then there is no direct way of doing that with CPeriodic, as said by Kevin, you can use start() and stop() methods according to your need.
Hi vasant
Yes i want something like "pause", and there is no method like stop()in CPeriodic, so delete this timer and start it again whenever it is required.
savaj....
opps my bad, its Cancel() and no need to delete the timer, you can simply call Cancel() on the timer and start it again, but for "Pause" behaviour you need implement your own logic.