Home > Software engineering >  MFC in the same function in two consecutive calls settimer () function, before a called function is
MFC in the same function in two consecutive calls settimer () function, before a called function is

Time:09-24

The settimer (1100, NULL);
The settimer (2500, NULL);

In ontime function, the settimer (0 1100, NULL); This timer expiration, the great god to explain

CodePudding user response:

Different ID, will not fail!
OnTimer parameter is the representative of the timer ID, in there you judge and deal with

If there are signs of failure, because the timer messages in the queue, retain more than one that is to say, when still in the process of dealing with timer, receive the same timer so it will be ignored, until the timer process is free

CodePudding user response:

Low priority in the program of the timer, half different ID not failure, if any, should be to you on a timer no KillTimer

CodePudding user response:

Don't in ontime function, the settimer
The settimer where need time

CodePudding user response:

OnTimer incoming parameters is to distinguish the ID
  • Related