A way to ensure that a system tray icon is removed… guaranteed

后端 未结 8 2467
广开言路
广开言路 2021-02-20 10:21

Is there a way to guarantee that your system tray icon is removed?

To add the system tray icon you do:

Shell_NotifyIcon(NIM_ADD, &m_tnd);
         


        
8条回答
  •  日久生厌
    2021-02-20 11:09

    Hmm, you can always have an external monitor process call SendMessage with the WM_PAINT message to the system tray window (which you would have to do based on the class of the window). That should remove the icon which is no longer valid.

提交回复
热议问题