Implementing a digital countdown is the easiest thing to do - Text field, Button, and a Timer. Implementing a graphical stopwatch is the hardest, you will need a bitmap for the watch face, then you can draw the hands on it. How much time do you want spend writing the code, versus how good should it look?
The basics are like this:
- In OnInitDialog, add SetTimer(ID_MY_STOPWATCH,1000,NULL)
- In your message map you need ON_WM_TIMER()
Then a WM_TIMER handler like this:
void CTimerTestDlg::OnTimer(UINT_PTR nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if (nIDEvent==ID_MY_STOPWATCH)
{
// Update the UI here
}
CDialog::OnTimer(nIDEvent);
}