Jump to content
  • Advertisement
Sign in to follow this  
Kranar

Getting list of all windows.

This topic is 4815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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);


Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!