To set a timer, use the SetTimer function. You can do this by adding a WM_CREATE case to your application, as follows:
case WM_CREATE:
/* Set the timer for five-second intervals. */
idTimer = SetTimer(hWnd, NULL, 5000, (TIMERPROC) NULL);
break;