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

后端 未结 8 2452
广开言路
广开言路 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:04

    You can use SetUnhandledExceptionFilter to catch the crash. I normally use it to create a crash dump file so that the crash can be debugged, but there's no reason you can't so some simple cleanup like removing tray icons.

提交回复
热议问题