I'm trying to debug a huge Win32 GUI application (I have full sources) divided into several processes. The problem is the following: in one process I have a dialog with a listbox, when I double-click an item in the listbox another process is started that creates its own window that is brought to front and covers the initial dialog. If I do some manipulations (that I can't fully explain yet since I don't fully understand them yet) something forces the initial dialog to start flashing in the taskbar.
I tried Microsoft Spy++ and see that whenever I do that manipulation WM_ACTIVATE is sent to the dialog, most of the times it has these parameters:
fActive: WA_INACTIVE fMinimized:False hwndPrevious:(null)
and in those cases the dialog doesn't starts flashing. But once in a while the parameters are
fActive: WA_ACTIVE fMinimized:False hwndPrevious:(null)
and that precisely corresponds to the dialog flashing.
MSDN says WM_ACTIVATE is sent with WA_ACTIVE when a window is activated by some method other than a mouse click (for example, by a call to the SetActiveWindow function or by use of the keyboard interface to select the window).
Now in the application code SetActiveWindow() is never called and I don't do anything with the keyboard that could switch windows.
What other reasons are possible for WM_ACTIVATE being sent with WA_ACTIVE?