Getting list of all windows.
Is there a way to get the list of every single window running or atleast visible on the desktop?
Just a list of their names, so for example right now I would have something along the lines of a list with:
"Post a New Message - GameDev.Net Discussion Forums - Microsoft Internet Explorer"
"Someguy - Conversation"
"Windows Explorer"
"Notepad"
Since all of those windows are running as I type this message?
Thank you.
EnumWindows will enumerate all windows on your system. Usage:
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam){ // only list visible windows. if(IsWindowVisible(hwnd)) { char szWindowText[MAX_PATH]; memset(szWindowText,0,MAX_PATH); GetWindowText(hwnd,szWindowText,MAX_PATH); printf("%s\r\n",szWindowText); } return true;}// ...EnumWindows(&EnumWindowsProc,0);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement