What windows messages are triggered (wm_xyz) when an application window goes from background to foreground (or from invisible/minimized to visible/maximised)?
Asked
Active
Viewed 1,113 times
0
-
1Why not put tracing messages in your WndProc? – James Feb 09 '11 at 19:04
-
It depends on how the window is brought to the front. Can you be more specific about what you're trying to do? – Adrian McCarthy Feb 09 '11 at 20:49
1 Answers
1
There's a complex interaction involving:
- WM_NCHITTEST
- WM_NCACTIVATE
- WM_ACTIVATEAPP
- WM_ACTIVATE
- WM_MOUSEACTIVATE
- WM_SETFOCUS
- WM_SHOWWINDOW
- WM_NCPAINT
- WM_PAINT
- and others, depending on the details of the situation
You can learn a lot by using Spy++ (which comes with Visual Studio).
If you can provide more detail on what you're trying to do, we can probably point you to the right subset of messages. To learn more about a specific message, search for the message/notification with MSDN, e.g., "MSDN WM_PAINT".

Adrian McCarthy
- 45,555
- 16
- 123
- 175