
CClockCtrl v1.05
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 6 workspace file to build a small demonstration app.
Copyright
- 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.
Updates
v1.0 (3 February 2000)
V1.01 (16 February 2000)
- Removed noticeable flicker which sometimes occurred when
the seconds hand moved.
V1.02 (27 July 2001)
- Fixed a drawing glitch which left the old hour hand
being displayed every 12 minutes
- 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.03 (1 August 2001)
- Second hand can now be updated with sub second
precision with the "SetSubSecondPrecision" method.
- 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.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.05 (23 March 2002)
- Updated Copyright details.
- Fixed a bug where PreSubclassWindow was not calling
RecalcLayout before a redraw was occurring.