Jose Alonso alonso@estadao.com.br writes:
Yes, the first time that PeekMessage (1) is called, the timer message is handled by find_expired_timer, but the timer is not restarted because the parameter PM_NOREMOVE is set. The WM_TIMER message remains in the queue, and next time the PeekMessage (3) is called with PM_REMOVE the get_post_message is called. I confirmed this by putting some "printf" in queue.c
The WM_TIMER cannot "remain in the queue", it's never put there in the first place, it's generated on the fly. If you really see a WM_TIMER in the posted message queue, it's because someone has done a PostMessage on it, and that would definitely be a bug. I doubt it's the problem you are seeing though.