+ // We need an icon to show the notification in a balloon attached to it.
+ // It may happen that the main application already shows an icon in the
+ // taskbar notification area in which case it should call our
+ // UseTaskBarIcon() and we just use this icon without ever allocating nor
+ // deleting it and ms_refCountIcon is -1 and never changes. Otherwise, we
+ // create the icon when we need it the first time but reuse it if we need
+ // to show subsequent notifications while this icon is still alive. This is
+ // needed in order to avoid 2 or 3 or even more identical icons if a couple
+ // of notifications are shown in a row (which happens quite easily in
+ // practice because Windows helpfully buffers all the notifications that
+ // were generated while the user was away -- i.e. the screensaver was
+ // active -- and then shows them all at once when the user comes back). In
+ // this case, ms_refCountIcon is used as a normal reference counter, i.e.
+ // the icon is only destroyed when it reaches 0.
+ static wxTaskBarIcon *ms_icon;
+ static int ms_refCountIcon;