Handles to visible programs

This is a discussion on Handles to visible programs within the Windows Programming forums, part of the Platform Specific Boards category; Does anyone know how to get the handles of the programs which are currently visible? I know about the EnumWindows() ...

  1. #1
    return 0;
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    89

    Handles to visible programs

    Does anyone know how to get the handles of the programs which are currently visible? I know about the EnumWindows() function, but this one gives me alot of window handles, including handles to windows that aren't visible.
    I guess one way to get handles to visible windows is to test wether ShowWindow(hwnd,SW_SHOW) has been called for a specific window, but I also don't know what function I could use for that purpose.

    Thanks in advance

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    return 0;
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    89
    Ah thanks alot!

  4. #4
    uh oh
    Join Date
    Jan 2005
    Location
    Ontario, CA
    Posts
    66
    Is there a way to determine which of the visible windows are the actual visible ones (when looking directly at the screen you would only see the windows at the very top and those that are not obscurred from view by other windows). Basically trying to figure out the most currently active window, followed by the windows that were more recently active. Using GetWindowRect() I could determine which parts of each window would be visible based on the knowledge of which windows were the most currently active. Not sure if this is possible, but who knows. Just a side thought when I read this post.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  2. Newbie question: pointers, other program's memory
    By xxxxme in forum C++ Programming
    Replies: 23
    Last Post: 11-25-2006, 01:00 PM
  3. Replies: 0
    Last Post: 03-17-2006, 09:14 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 04:12 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21