In its WndPaint function, DIGCLOCK uses the time and localtime C functions available in the Microsoft C Compiler library to determine the current date and time. The localtime function puts all the information we need into a structure; several macro definitions near the top of the program help make the wsprintf calls more readable. (You should avoid making MS-DOS or ROM BIOS function calls in your Windows programs; use Windows functions or the C run time library instead.)