CStatic as digital clock

Download project files.

Class CXJWDigitClock is a static control derived from CStatic. It displays as
a digital clock,as shown below:

digitclock_sample.jpg (26130 bytes)

There are three properties in CXJWDigitClock

face color <—–> SetColor();
second style <—–> SetStyle();
alarm mode <—-> SetAlarm();

Usage: Check the sample project for the detail.

Note: You should insert all 12 bitmaps in your project, and take care the value and order of bitmap’s ID.
In my sample project, I used IDB_BITMAP1 to IDB_BITMAP12 side by side. See following:

Digit ID VALUE
0 IDB_BITMAP1 100
1 IDB_BITMAP2 101
2 IDB_BITMAP3 102
3 IDB_BITMAP4 103
4 IDB_BITMAP5 104
5 IDB_BITMAP6 105
6 IDB_BITMAP7 106
7 IDB_BITMAP8 107
8 IDB_BITMAP9 108
9 IDB_BITMAP10 109
10 IDB_BITMAP11 110
11 IDB_BITMAP12 111

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read