In my opinion, MFC's idle processing happens too often. Unfortunately, we can't change it because it might break apps when not necessary. But.. we have built in to the code a way for applications to customize the times in which they "enter idle". The secret? CWinThread::IsIdleMessage!!
Here's an example which disables idle entry for mouse & timer messages:
Now, what would happen if you had a clock on your status bar, and were relying on a WM_TIMER to kick in a call to your update handler for that pane? Well... as you might have guessed, the above code would break you. There is an easy way to fix that, as there is a backdoor method of forcing an idle to kick in: WM_KICKIDLE defined in afxpriv.h can be used to make this happen.
So, in your timer handler (most likely a handler in your derived CStatusBar class), you would add some code which does:
If you take a look at CWinThread::IsIdleMessage, you'll see that we go through a fair amount of pane to avoid unnecessary OnIdle calls. Like checking for mouse moves to the same location as last time (I don't know why NT does that, but it does... every time the caret flashes). We are doing just about everything we can without breaking backward compatibility.
-deanm@microsoft.com, via email.