/*------------------------------------------- window procedure ---------------------------------------------*/ LRESULT CALLBACK WndProcTimer(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { switch(message) { case WM_CREATE: OnCreate(hwnd); return 0; case WM_DESTROY: OnDestroy(hwnd); return 0; case WM_TIMER: switch(wParam) { case IDTIMER_TIMER: OnTimerTimer(hwnd); break; } return 0; // show dialog box case TIMERM_SHOWDLG: OnShowDialog(hwnd); return 0; // add item to tcmenu*.txt case TIMERM_REQUESTMENU: OnRequestMenu(hwnd, FALSE); return 0; // stop running timer case TIMERM_STOP: OnStopTimer(hwnd, (int)lParam); return 0; } return DefWindowProc(hwnd, message, wParam, lParam); }
//================================================================================================ //-----------------------------------+++--> Values Above Are Required by Main Timer Function Below: void OnTimerMain(HWND hwnd) //------------------------------------------------------------+++--> { time_t ts; OnTimerTimer(hwnd); // timer.c ts = time(NULL); OnTimerAlarm(hwnd, ts); // alarm.c }