I want to use Timer but I don't know how to restart it in case of Button click ?
Display All
Source Code
- switch (pMsg->MsgId)
- {
- case WM_INIT_DIALOG:
- WM_CreateTimer(hWin, 0, 100, 0);
- break;
- case WM_TIMER:
- if(restart_timer == 1)
- WM_RestartTimer(pMsg->Data.v, 100); //TIMER IS NOT ALWAYS RESTARTED IN WM_TIMER CASE
- break;
- case WM_NOTIFY_PARENT:
- Id = WM_GetId(pMsg->hWinSrc);
- NCode = pMsg->Data.v;
- switch(Id)
- {
- case ID_BUTTON_0: // Notifications sent by '-'
- switch(NCode)
- {
- case WM_NOTIFICATION_CLICKED:
- WM_RestartTimer(pMsg->Data.v, 400); //HOW TO ACCESS / RESTART TIMER IN THIS CASE ???? pMsg->Data.v does not work
- break;
- }
- }
- break;
- }