I have a (large) application that works perfectly under XP. When I run it under Windows 7 the "File Edit View..." menu in my application flickers when everything is otherwise idle.

I have traced this down to SetTimer and its associated OnTimer function. OnTimer usually does nothing, so I have commented out everything leaving this:
void MyView::OnTimer(UINT nIDEvent) { }
I have also changed the SetTimer call to give one tick every five seconds.

I now see the same behaviour: the File menu is very briefly greyed-out every five seconds, leading to the flicker. Nothing else in the window is exhibiting this flicker.

So, I have a call to a null function every five seconds that manages to affect a menu.

Any ideas as to what may be causing this?