-
January 2nd, 2011, 04:57 PM
#1
Win32 Clock
Could some one please help me?
I have static box that makes the system time appear in hours mintues and seconds but it only refreshes when i move the mouse or other window activitey is there away to allow the clock to refresh freely?
-
January 2nd, 2011, 05:55 PM
#2
Re: Win32 Clock
Set up a Windows timer (with a NULL callback function pointer) and handle the timer messages in your window class' OnTimer() event handler to update the clock display. Have a look at CWnd::SetTimer() in MSDN for instructions on how to do that.
A timer interval of 1000 ms should be ok for this application in most cases. That way your clock display may be off by a maximum of one second relative to the system clock, but your app wouldn't be too busy handling the timer messages.
HTH
BTW, please note that double-posting doesn't get you quicker, better or more answers. But maybe that was an unintentional mistake.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
-
January 2nd, 2011, 06:31 PM
#3
Re: Win32 Clock
Thanks and the double post was unfortunate
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|