I need an analog clock control written using plain C++ and Win32. There are plenty of samples on Codeguru and [login to view URL], but I need one that does *not* use MFC.
It should be something similar to this (but without MFC):
<[login to view URL]>
From our main window, I would like to create it like this:
HWND clockWnd = CreateClock(x, y, width, height, HBITMAP hBmp);
X and Y are the top, left coordinates.
Width and height specify size of the clock control.
hBmp is the clock face background image. This image should be centered (not stretched) within the width and height.
Return value is the Hwnd of the clock, or NULL if error.
It should be possible to customize the color of each hand (hours, minutes, seconds), as well as specify the background image. I don't want to show the date anywhere.
**Important:**
1) Code should be written using pure Win32 APIs.
2) Hungarian notation should be used throughout. I cannot accept work that doesn't use Hungarian.
3) Everything should be cleanly commented.
## Deliverables
All the code should be contained in a single [login to view URL] file and a ClockWnd.h header. So you will deliver:
ClockWnd.h
[login to view URL]
with no other dependencies.
## Platform
Win32