Disable offline display NotifyIconOverflowWindow

I made a popup similar to win7 battery counter. It behaves exactly the same as the built-in one, except when it is displayed using the notification icon, which is located on NotifyAreaOverflowWindow , and also notifies the redundant area that the window will automatically shut down after a while while it should be hidden only when my popup screen closes. The only difference that I was able to detect with spyxx , which overflows the window after a while, simply sends a WM_SHOWWINDOW wp:0 lp:0 message.

How can I prevent the overflow window from being automatically removed during active popup?

screenshot

  • Image 1: a test popup is shown after clicking the notification icon, which is in the overflow area + a couple of seconds of user inactivity.
  • Image 2: The battery indicator pop-up is shown by tapping the notification icon, which is in the overflow area + 2 minutes of user inactivity.
+4
source share
2 answers

You have to call

 NotifyWinEvent(EVENT_SYSTEM_MENUPOPUPSTART, Handle, OBJID_CLIENT, 0); 

before you open the window and call

 NotifyWinEvent(EVENT_SYSTEM_MENUPOPUPEND, Handle, OBJID_CLIENT, 0); 

after hiding it.

+1
source

Departures are no different from any other window.

If I understand your problem, and it is that the windows disappear over time, the solution is quite simple. Do not use all NotifyAreaOverflowWindow . Instead, create your own window with the appropriate properties (no controls, no max / min buttons, no title text, etc.). Due to the fact that you cannot control the duration of the class / object you are using. It is probably intended for one-time notifications, and not for something moderately useful;).

In addition, you can do fantastic things as you wish without encountering problems.

The following tutorial details how to position it like this: http://blog.quppa.net/2010/12/09/windows-7-style-notification-area-applications-in-wpf-part-3-taskbar- position /

0
source

Source: https://habr.com/ru/post/1491839/


All Articles