Jose Alonso alonso@estadao.com.br writes:
for (;;) {
(1) if (PeekMessageW( &msg, 0, 0, 0, PM_NOREMOVE )) ... { (2) DispatchMessageW( &msg ); } if (!fEndMenu) fRemove = TRUE;
/* finally remove message from the queue */ if (fRemove && !(mt.trackFlags & TF_SKIPREMOVE) )
(3) PeekMessageW( &msg, 0, msg.message, msg.message, PM_REMOVE ); else mt.trackFlags &= ~TF_SKIPREMOVE; }
(1) The WM_TIMER is peeked and the timer is not restarted (PM_NOREMOVE) (2) The WM_TIMER is dispatched here (3) The WM_TIMER is only removed from the queue. The next PeekMessageW (1) return immediately with WM_TIMER since the timer was not restarted.
The timer was restarted in (3), so I'd expect things to work right. There must be something else going on here.