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 92845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:15:04+00:00 2026-05-10T23:15:04+00:00

I want to determine if a certain window is visible to the user or

  • 0

I want to determine if a certain window is visible to the user or hidden/occluded. In Windows XP I would use the GetClipBox() function and check for a NULLREGION or empty RECT return value. This worked perfectly fine, but on Windows Vista it does not work if another window is occluding the window. In this case, GetClipBox() is returning SIMPLEREGION with a non-empty RECT.

Does anybody know why this is not working on Vista or if there is another way to check if a window can be seen by the user?

  • 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. 2026-05-10T23:15:05+00:00Added an answer on May 10, 2026 at 11:15 pm

    The simple reason GetClipBox() is not returning NULLREGION with DWM enabled is because you are not being clipped! The whole point of the DWM is each window (that isn’t a child, like buttons or edit boxes) gets it’s own buffer to draw to, so foreground windows can be moved around without having to fill in the windows behind them.

    As a simple example, hover over your window entry in the task bar when it is in the background and see it being updated in the preview.

    Also note that with glass edges, your window can be completely covered by other windows and still be visible! (You can’t even test client area, because of extended glass, like Windows Media Player uses – resize it to as small as it will go and see it use glass for its entire area!) Of course, layered windows (from XP on) and custom window regions meant this could always be the case, but now it’s the default.

    Summary/TL;DR:

    If you are doing heavy animation/fancy effects and want to reduce CPU usage when running under the DWM, probably the best you can do is detect when your application looses foreground and fallback to more CPU friendly updating (NOT no updating! If you get a WM_PAINT, and ignore it because you are in the background, you won’t get one when you are activated!).

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

Sidebar

Ask A Question

Stats

  • Questions 59k
  • Answers 59k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I guess it's not a bad solution for the problem.… May 11, 2026 at 8:57 am
  • added an answer Give a look to Firefox Pencil Extension, is a basic… May 11, 2026 at 8:57 am
  • added an answer Disposable objects always need to have a clear owner who… May 11, 2026 at 8:57 am

Related Questions

I want to determine if a certain window is visible to the user or
If I have a URL (eg. http://www.foo.com/alink.pl?page=2 ), I want to determine if I
I want to determine whether two different child nodes within an XML document are
I want to be able to pass something into an SQL query to determine
From within my Java program I want to determine which .NET Framework is installed
Is there a way to determine the device running an application. I want to
I want to write a sh/bash script that can determine whether a particular directory
I want to programatically create an NSTextView. How can I determine the correct frame
I have a record set that includes a date field, and want to determine
I want to loop over the contents of a text file and do a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.