CClockCtrl v1.07 An MFC class to display
an analog clock
CClockCtrl is an MFC widget which renders an analog clock. The class is based
in part on the class of the same name from the book "MFC Programming with Visual
C++ 6.0". The class is derived from CStatic and a number of public methods
allow customisation of its look.
The enclosed zip file contains the CClockCtrl
source code and also includes a VC 2017 workspace file to build a small demonstration
- You are allowed to include the source code in any product (commercial, shareware,
freeware or otherwise) when your product is released in binary form.
- You are allowed to modify the source code in any way you want except you
cannot modify the copyright details at the top of each module.
- If you want to distribute source code with your application, then you are
only allowed to distribute versions released by the author. This is to maintain
a single distribution point for the source code.
V1.07 (29 December 2018)
- Updated copyright details.
- Fixed a number of C++ core guidelines compiler warnings. These changes
mean that the code will now only compile on VC 2017 or later.
V1.06 (31 December 2016)
- Updated copyright details.
- Replaced all occurrences of NULL with nullptr throughout the codebase
- Updated the code to clean compile on VC 2010 to VC 2015. The code now requires
VC 2010 at a minimum.
- Added SAL annotations to all the code
V1.05 (23 March 2002)
- Updated Copyright details.
- Fixed a bug where PreSubclassWindow was not calling RecalcLayout before
a redraw was occurring.
V1.04 (11 August 2001)
- Removed Win2k Build configurations and instead put in code into sample app
to at runtime, detect if the OS provides transparency support. This means that
the exe in the distribution will run on any Win32 OS without the need to recompile.
V1.03 (1 August 2001)
- Second hand can now be updated with sub second precision with the "SetSubSecondPrecision"
- Please remember that the included exe will only work on Win2k as it used
some of the new window layering API's. To get the sample app to work on Win9x
or NT 4, recompile the code using one of the non Win2k build configurations.
V1.02 (27 July 2001)
- Fixed a drawing glitch which left the old hour hand being displayed every
- Made most of the functions virtual to allow easier customisation.
- Sample app now can be dragged via left mouse button.
- Sample app now includes always on top functionality.
- Sample app now includes transparent window support (Windows 2000 and later
only). Specific build configurations are included for this. Please note that
you will need the platform SDK installed now to compile these specific configurations.
- Sample app now provides a context menu.
- A new icon as been provided for the sample app.
- Got rid of MFC document / View code in sample as it was not needed.
V1.01 (16 February 2000)
- Removed noticeable flicker which sometimes occurred when the seconds hand
v1.0 (3 February 2000)