Hide additional icon when showing notification

Hi! I am building a cross-platform python application with wxpython.
I installed it: pip install wxPython

import wx.adv
nm = wx.adv.NotificationMessage(title, st)

But I also use wx.adv.TaskBarIcon and I need to hide additional icon which shows with notification.
I found out that it can be done with static MSWUseToasts(shortcutPath="", appId="") here:

Unfortunately, I cannot understand how to call this MSWUseToasts function and what parameters to specify. I tried calling it like this:

nm.MSWUseToasts("some_shortcut", "123")

and I get error:
AttributeError: 'NotificationMessage' object has no attribute 'MSWUseToasts'

Also, documentation says that I have to create a shortcut to the application in the start menu. How can I do that in python and how do I get its appID?

Hello Rualark,
the link you posted above is for the pre-release version of wxPython. Because you used pip to install, i guess you have version 4.0.x installed. In that version MSWUseToasts is not yet available.


Thanks! Does that mean that wxpython does not allow to hide additional icon when showing toast notifications on Windows 10 in version 4.0.x?

This is out of my knowledge. Maybe Robin or someone from the wxWidgets side can tell.

Could anyone please help on this?

Hi! I found solution for this:
use wx.adv.TaskBarIcon.ShowBalloon instead of wx.adv.NotificationMessage