I am looking for a way to programmatically get the current taskbar icons (not the system tray) for each program that is in the taskbar.
I haven't had much luck with MSDN or Google, because all of the results relate to the system tray.
Any suggestions or pointers would be helpful.
EDIT: I tried Keegan Hernandez's idea but I think I might have done something wrong. The code is below (c++).
#include <iostream>
#include <vector>
#include <windows.h>
#include <sstream>
using namespace std;
vector<string> xxx;
bool EnumWindowsProc(HWND hwnd,int ll)
{
if(ll=0)
{
//...
if(IsWindowVisible(hwnd)==true){
char tyty[129];
GetWindowText(hwnd,tyty,128);
stringstream lmlm;
lmlm<<tyty;
xxx.push_back(lmlm.str());
return TRUE;
}
}
}
int main()
{
EnumWindows((WNDENUMPROC)EnumWindowsProc,0);
vector<string>::iterator it;
for(it=xxx.begin();it<xxx.end();it++)
{cout<< *it <<endl;}
bool empty;
cin>>empty;
}