Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help please:) - use a timer to interrupt a background th
Message
De
21/11/2001 10:51:49
 
 
À
20/11/2001 09:00:40
Information générale
Forum:
Visual C++
Catégorie:
Microsoft Foundation Classes
Divers
Thread ID:
00583872
Message ID:
00584503
Vues:
24
>I need hepl with this one pleaseeee:))
>"write a windows program that looks like a digital clock".
>two parts:
>first part: to built a simple windows program that does nothing but start a framwork from running.
>second part: the way i envisage a clock functioning is that its updating should be essentially a backround process. The calculation of the system's time should occure say every 5 seconds. Then you format a string that will contain an updated time value, post it off for display, and put your program thread back to sleep. That leaves the program able to let other internal threads run.

first part: Create a dialog based app, with MFC Appwizard.

second part: In the OnInitDialog method for the dialog, use SetTimer with the lpfnTimer parameter set to NULL to start a timer & with the class wizard, create a function for the WM_TIMER message - put the string formating in that function.

(I'm assuming you're using VC++ rather than C#, BTW)
Len Speed
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform