タスクバーにある各プログラムの現在のタスクバー アイコン (システム トレイではない) をプログラムで取得する方法を探しています。
すべての結果がシステム トレイに関連しているため、MSDN や Google ではうまくいきませんでした。
どんな提案や指針も役に立ちます。
編集: キーガン・ヘルナンデスのアイデアを試してみましたが、何か間違ったことをしたのではないかと思います。コードは以下 (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;
}