4

I have done flyout window similar to win7 battery meter. It is behaving just like built in one except when it is shown via notify icon who is located on NotifyAreaOverflowWindow aka notify overfow area that window autohides itself after some time while it should hide only when my flyout closes. The only difference that I could spot with spyxx that after some time overflow window simply sends itself an WM_SHOWWINDOW wp:0 lp:0 message.

How can I prevent the overflow window from autohiding while my flyout is active?

screenshot

  • Image 1: Test flyout shown after click on notify icon which is located on overflow area + couple seconds of user inactivity.
  • Image 2: Battery meter flyout shown by clicking on notify icon which is located in overflow area + 2 mins of user inactivity.
user629926
  • 1,910
  • 2
  • 18
  • 43
  • 2
    The down voter did not provide any comments, but I think you should put more effort in your question. Tips : use line feeds and add a screen shot of what you want to avoid, some code, etc. – ixe013 Jul 19 '13 at 17:20
  • I can't post any pictures or edit text better (tryed) because this all is sent from phone. About code, it can be faund as shell sample called NotificationIcon in Windows SDK 7.1 . – user629926 Jul 19 '13 at 20:06
  • [That sample is in C++](http://archive.msdn.microsoft.com/shellintegration). Did you rewrite it in C# or is your question mis-tagged ? +The window in that sample hides itself when it is inactive. Do you click anywhere or the windows just hides itself after some time ? – ixe013 Jul 19 '13 at 20:18
  • 1
    Try to move it's icon to notify oferflow area and click on it. Wait. After some time overflow area will hide and the window will just hang there. I need for overflow window not to hide while the flyout is shown. – user629926 Jul 19 '13 at 20:32
  • 2
    The notification area is the user's property; other than placing your application in it or removing that application, you don't get to interface with it. http://blogs.msdn.com/b/oldnewthing/archive/2011/04/26/10157902.aspx – ErikHeemskerk Jul 23 '13 at 11:49
  • I can't post int in question so I'll post it here. Image 1 : Test flyout shown after click on notify icon which is located on overflow area + couple seconds of user inactivity. Image 2: Battery meter flyout shown by clicking on notify icon which is located in overflow area + 2 mins of user inactiviti. postimg.org/image/tgaw2f6f1/2bfb96dd/ – user629926 Jul 23 '13 at 13:35

2 Answers2

1

You should call

NotifyWinEvent(EVENT_SYSTEM_MENUPOPUPSTART, Handle, OBJID_CLIENT, 0);

before you show your window and call

NotifyWinEvent(EVENT_SYSTEM_MENUPOPUPEND, Handle, OBJID_CLIENT, 0);

after you hide it.

kjen93
  • 60
  • 5
0

Flyouts are no different from any other window.

If I'm understanding your problem, which is that the windows disappear over time, then the solution is quite simple. Do not use whatever NotifyAreaOverflowWindow is. Instead, create your own window, with the appropriate properties (no control box, no max/min buttons, no title text, etc...). Because it's likely out of your control to set the duration of the class/object you're using. It's likely designed for single-notifications, and not something moderately useful ;).

Plus, you'll be able to do fancy things as desired without running into anymore issues.

The following tutorial goes in great lengths on how to position it so perfectly: http://blog.quppa.net/2010/12/09/windows-7-style-notification-area-applications-in-wpf-part-3-taskbar-position/

Mike Weir
  • 3,094
  • 1
  • 30
  • 46
  • Thank for your response. NotifyAreaOverflowWindow is that window (shown near number 2 on second picture) refered as notification area overflow in this document http://msdn.microsoft.com/en-us/library/windows/desktop/aa511448.aspx. I do not use it directly I just wan it to remain visible as long my own flyout is. – user629926 Aug 23 '13 at 13:33
  • My answer remains unchanged. I'm suggesting you just create your own window so you have proper control. See the link I provided. – Mike Weir Aug 23 '13 at 16:27