Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
End Users
Pocket PCActiveSyncMultimediaEBooksWirelessSmartPhones
Developers
Windows MobileSmartPhonesWinCE ProgrammingVB for WinCEVC++ for WinCEPlatform BuilderTest Tools
PocketPC DirectoryFree SoftwareWeb Resources
Related Topics
PalmMobile PhonesMore Topics ...

Pocket PC Forum / Developers / VC++ for WinCE / July 2008

Tip: Looking for answers? Try searching our database.

TIMER

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Miky - 22 May 2008 23:59 GMT
Hi All,

How do I suspend the TIMER that I have launched with SetTimer?

Thanks

Miky
Chris Tacke, eMVP - 23 May 2008 00:06 GMT
By calling KillTimer().  Reading the docs is useful at times like these:

http://msdn.microsoft.com/en-us/library/ms644906.aspx

Signature

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com

> Hi All,
>
[quoted text clipped - 3 lines]
>
> Miky
Brian Burgess - 14 Jul 2008 08:56 GMT
This doesn't suspend .. it destroys.    Any suggestions relating to the
question asked?

Thx

-B

> By calling KillTimer().  Reading the docs is useful at times like these:
>
[quoted text clipped - 7 lines]
>>
>> Miky
Christopher Fairbairn [MVP] - 14 Jul 2008 10:49 GMT
Hi,

> This doesn't suspend .. it destroys.    Any suggestions relating to the
> question asked?

There is no suspend functionality with this kind of timer. When you want to
pause a timer you can call KillTimer as suggested by Chris Tacke. When you
then want to "resume" the timer simply call SetTimer again to start it up
again.

Is this what you wanted?

If you have a 20 second timer and want to "pause" and resume it from where
it left off (i.e. if paused after 5 seconds when it is resumed it will time
15 seconds) there are a number of ways to do this.  When you call KillTimer
to suspend the timer you could call GetTickCount() and compare the returned
value to a value you recorded when you called SetTimer (this determines how
long the timer has been running and hence the length of time you should
subtract from your original timeframe).

Hope this helps,
Christopher Fairbairn
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.