Ok so i found a example on EnumWindows here and used it but it's getting a lot more stuff than the windows i have on the taskbar. I want to get only windows on the taskbar.
Here is the code:
EnumWndProc function:
Code:
BOOL CALLBACK EnumWinProc(HWND hWnd,LPARAM lParam)
{
HWND hList1= (HWND)lParam;
CHAR lpWinName[MAX_PATH];
GetWindowText(hWnd,lpWinName,MAX_PATH);
if(strlen(lpWinName))
SendMessage(hList1,LB_ADDSTRING,
0,(LPARAM)lpWinName);
return TRUE;
}
And the way i call it:
Code:
EnumWindows(EnumWinProc,(LPARAM)hList1);
Hope that someone can help.
~Cha0sBG