I am trying to write application in C# that catch the handle of the hidden windows that appear when pressing the button ("Show hidden icons").
When we don't show all the notification area we have hidden system tray icons.
When we press on the button ("Show hidden icons") that show them we have a new window that all the icons inside it:
The hidden windows marked with green circle
How can I catch the handle of this hidden window ?
When I used Spy++ I couldn't find this window because the windows dissapears when I click any other key on the keyboard.
So I found the handle of the button and used the logging option:
In the logging results I only saw windows handles of the regular system tray tool bar:
So how can I catch the handle of the hidden window (the one I marked with green in the begging of my question, first pictuare).
References (links I found but didn't help me):
How to capture Notification icons properties using Microsoft Spy++
Get information about hidden tray icons in windows7
I succeed !
I succeed to catch it with Spy++:
Code solution:
static IntPtr GetHiddenSystemTrayHandle()
{
IntPtr hWndTray = User32.FindWindow("NotifyIconOverflowWindow", null);
if (hWndTray != IntPtr.Zero)
{
if (hWndTray != IntPtr.Zero)
{
// Windows caption "Overflow Notification Area"
hWndTray = User32.FindWindowEx(hWndTray, IntPtr.Zero, "ToolbarWindow32", null);
return hWndTray;
}
}
return IntPtr.Zero;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With