How to add custom item to system menu in C++?

后端 未结 4 1251
刺人心
刺人心 2021-01-13 03:05

I need to enumerate all running applications. In particular, all top windows. And for every window I need to add my custom item to the system menu of that window.

Ho

4条回答
  •  無奈伤痛
    2021-01-13 03:58

    Re: the update - please note that not even Microsoft Windows requires windows to have a sytem menu. GetMenu( ) may return 0. You'll need to intercept window creation as well, because each new top window presumably needs it too.

    Also, what you propose is rather intrusive to other applications. How are you going to ensure they don't break when you modify their menus? And how are you going to ensure you suppress the messages? In particular, how will you ensure you intercept them before anyone else sees them? To quote Raymond Chen, imagine what happens if two programs would try that.

提交回复
热议问题