From: TC on

David Jones wrote:

> Correct me if I'm wrong, but isn't the taskbar a list of all top-level windows?


Raymond says:
* If the WS_EX_APPWINDOW extended style is set, then it will show (when
visible).
* If the window is a top-level unowned window, then it will show (when
visible).
* Otherwise it doesn't show.

http://blogs.msdn.com/oldnewthing/archive/2003/12/29/46371.aspx

HTH,
TC

From: David Jones on
TC wrote:
> David Jones wrote:
>>Correct me if I'm wrong, but isn't the taskbar a list of all top-level windows?
>
> Raymond says:
> * If the WS_EX_APPWINDOW extended style is set, then it will show (when
> visible).
> * If the window is a top-level unowned window, then it will show (when
> visible).
> * Otherwise it doesn't show.
>
> http://blogs.msdn.com/oldnewthing/archive/2003/12/29/46371.aspx

I stand corrected.

That article, though, brings up an interesting point by mentioning
the ITaskbarList interface. I'm surprised that the taskbar allows
a means of modifying the list of items and yet does not appear to
export an interface to enumerate those items (i.e., an IEnumTaskbar
or even a method in ITaskbarList).

If a window was added via ITaskbarList, it wouldn't necessarily
show up by enumerating unowned top-level + WS_EX_APPWINDOW, so
that would mean there's no way at all to guarantee getting the
exact list shown in the taskbar. (Unless, of course, adding the
window via AddTab also set WS_EX_APPWINDOW, but MSDN does not
mention that.)

David
From: Galbu on
Well, EnumWindows that's what I'm looking for, but it shows even
strange windows like SysFader, AltTab, AutoCompleteProxy and Program
Manager.. What the hell are they ??

From: TC on
The Windows operating system sometimes broadcasts special messages to
"all windows". These messages are to advise the corresponding programs,
of certain system-level changes. If a program does not have a visible
user interface, but it wants to be advised of those changes, it creates
an invisible window for that purpose. That is one reason why you might
find unexpected or invisible windows with EnumWindows.

HTH,
TC

From: TC on
Yes, that does sound so. Try it & see. You can be the first person to
determine this one way or the other :-)

TC