Add ON_WM_TIMER() in BEGIN_MESSAGE_MAP

And then the following Function

void CTestDlg::OnTimer(UINT_PTR nIDEvent)

Also there should be a variable called m_seconds

And then in that function increase for every seconds tick