Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 906847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:27:17+00:00 2026-05-15T16:27:17+00:00

Is it possible to detect if a window for a program outside mine is

  • 0

Is it possible to detect if a window for a program outside mine is 1) completely visible, 2) partly hidden, or 3) completely hidden? I want to be able to tell my application not to do anything if a window (based on a retrieved handle) isn’t visible. I don’t care if the window has focus or not,what the z order is, or anything else, I’m just interested in how much of the window shows. If I need something else to get this, I’m fine, but is it possible? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T16:27:18+00:00Added an answer on May 15, 2026 at 4:27 pm

    Raymond Chen wrote an article about this a few years ago.

    The gist of it is that you can use GetClipBox to tell you what kind of clipping region a window’s device context has. A null region means the window is totally obscured, and a complex region means it’s partially obscured. If it’s a simple (rectangular) region, then visibility depends on whether the visible rectangle coincides with the bounds of the window.

    A DC can only be used by one thread at a time. Therefore, you should not acquire the DC of a window for an application that isn’t yours. Otherwise, you may encounter a situation where the other application — unaware of what you’re doing — attempts to use its DC while you’re still using it to inspect the clipping region. It should be perfectly safe to use it to make judgments about your own windows, though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Is there a way to detect if a browser window is not
Is it possible to detect if an application has an console window? Either by
Short question: Is it possible to detect window.open() in a UIWebView using the UIWebViewDelegate
Is it possible to detect if the visible map display more than one time
Is it possible to detect the system/processor architecture while the program is running (under
Is it possible in VimScript to detect if a split window touches the bottom
Is it possible to have a WPF window/element detect the drag'n'dropping of a file
I want to know if it's possible to have the script detect the URL
Possible Duplicate: How to tell if a DOM element is visible in the current
Is it somehow possible to detect whether program was started by a user or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.