How can you go about adding different program windows to an existing taskbar group tab on the Windows taskbar?
I figured out how to use the ITaskbarList2 interface and am able to add/remove tabs on the Windows taskbar. However, what I need to do is to be able to add windows to that new tab based on certain criteria. I, also, downloaded a program that allows you to add any program window to any taskbar tab, giving the user power over the taskbar grouping. That's what I need to be able to do programatically.
The issue I am trying to solve is...
At work, the traders use a program that spawns different child processes for their portfolios and other stuff. Each window's caption contains the type of window that it is. So, for instance, if a window is spawned for a portfolio view, the window caption would contain "Portfolio". If a window is spawned for their trade ledger, the window caption would contain "Ledger", etc.
The traders could have 20 or 30 windows opened at a time -- 10 ledger windows and 10 portfolio windows or whatever. The problem is that Windows XP will automatically group each window into a single tab on the taskbar (since they are all part of the same main program executable).
What I need is a way to search all the windows currently on the taskbar, find the windows that correspond to the main application and then group those windows according to their window captions. So, all the "ledger" windows would be grouped together in 1 tab and then all the "portfolio" windows would be grouped in another single tab, etc.
I know there's a way to do this, since the program I downloaded allows for this functionality manually. Since it's a program that is not mine, I can't reverse engineer it and see how it is achieving this functionality. But since it can do it -- the functionality is possible.
So, how can this be done? I don't care if the code is in C# or C++ (my guess is it would most likely be in C++). Does anybody know how to do this?
Thanks in advance.