Re: Programms in system tray
From: Rob Kennedy (.)
Date: 10/09/03
- Next message: John Herbster \(TeamB\): "Re: Windows programmer needed, Bay area only."
- Previous message: muzzy: "Programms in system tray"
- In reply to: muzzy: "Programms in system tray"
- Next in thread: Troels Jakobsen: "Re: Programms in system tray"
- Reply: Troels Jakobsen: "Re: Programms in system tray"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 08 Oct 2003 17:40:53 -0500
muzzy wrote:
> I am just curious if there is a way to find a list of apps, which are
> shown in the system tray?
First, we should clear up some concepts. An application can't be "in the
system tray." A program can tell the OS to put an icon in the
notification area, but that has absolutely no effect on anything else. A
single program can put a dozen icons there. That program doesn't need to
have any visible windows of its own, and what windows it has don't need
to be minimized "to the tray," either. To learn more, read about the
Shell_NotifyIcon API function.
> If i go with GetWindow(hwnd, GW_HWNDNEXT),
> i get all the active windowed processes.
You should use the EnumWindows function instead. The documentation
explicitly warns against using GetWindow to enumerate the windows on the
system.
> I try to sort them using:
>
> WndStyle := GetWindowLong(hwnd, GWL_STYLE),
>
> but i don't know what value shoud be WndStyle to indicate that the app
> is in the tray.
Whether there is an icon in the notification area has nothing to do with
the style of any window. Windows and notification icons have no relation.
Anyway, back to your original question. No, there is no general way to
get any information about any of the icons in the notification area.
Even if there's an icon registered, it might not be visible since
Windows XP hides unused icons.
Take a look at TraySaver, a utility by Mike Lin. I works as its own
"system tray," displaying icons on its own window instead of letting
Explorer show them on the taskbar. The C source code is available, so
you might find some useful information there.
http://www.mlin.net/TraySaver.shtml
-- Rob
- Next message: John Herbster \(TeamB\): "Re: Windows programmer needed, Bay area only."
- Previous message: muzzy: "Programms in system tray"
- In reply to: muzzy: "Programms in system tray"
- Next in thread: Troels Jakobsen: "Re: Programms in system tray"
- Reply: Troels Jakobsen: "Re: Programms in system tray"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|