   resetting timer win32
  Hi!I guess I have one of those noob, but impossible-for-me-to-spot bugs, I post here every time.The problem is, I can't set a new time interval to an existing timer.void StartMouseRepeat(){int setting = 0;SystemParametersInfo(SPI_GETKEYBOARDDELAY, 0, &setting, 0);SetTimer(win_state.hWnd,IDT_TIMER_MOUSE_REPEAT,(setting+1)*250,NULL);}void MouseRepeat(){int setting = 0;//KillTimer(win_state.hWnd, IDT_TIMER_MOUSE_REPEAT);//doesn't make differenceSystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, &setting, 0);SetTimer(win_state.hWnd,IDT_TIMER_MOUSE_REPEAT,10/*400 - (setting * 12) */,NULL);}void KillMouseRepeat(){KillTimer(win_state.hWnd, IDT_TIMER_MOUSE_REPEAT);}wind_proc:case WM_TIMER:switch (wParam) { case IDT_TIMER_TIME:...break;case IDT_TIMER_CARET:BlinkCaret();break;case IDT_TIMER_MODAL_BLINK:...break;case IDT_TIMER_GUI_FADE:...break;case IDT_TIMER_MOUSE_REPEAT:MouseRepeat();MenuLeftClick();break;}...break; #define IDT_TIMER_TIME1#define IDT_TIMER_CARET2#define IDT_TIMER_MODAL_BLINK3#define IDT_TIMER_GUI_FADE4#define IDT_TIMER_MOUSE_REPEAT5As you may have figured it out already, it's a mouse repeat stuff. But it only repeats with the keyboard delay value, the keyboard repeat value isn't set, or I don't know. If I replace timer intervals with hard coded values, the problem still remains.Either it's a stupid bug, or I still don't understand timers.Thanks in advance!   
  Yes, the idiotic bug.I call StartMouseRepeat on left click. What the hell I was expecting?Oh, I'm so happy, an other global /static variable...   