What window messages are triggered when window comes to foreground?

两盒软妹~` 提交于 2019-12-13 02:52:25

问题


What windows messages are triggered (wm_xyz) when an application window goes from background to foreground (or from invisible/minimized to visible/maximised)?


回答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".



来源:https://stackoverflow.com/questions/4949065/what-window-messages-are-triggered-when-window-comes-to-foreground

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!