🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3224

Is checking a window's dwStyle-value ' WS_VISIBLE' not sufficent to find out, if a window is currently visible on the screen?

#3224
From: MR
Date: Sun, 06 Aug 2006 06:20
28 lines
2002 bytes
To find out, if a certain window (hwnd) is overlapped by some other
windows, my application 'MyApp' uses the api-function
  GetNextWindow(hwnd, GW_HWNDPREV))
to get all windows which have higher z-order priority that hwnd and
compare their rect-values to find out, if they have some common
regions.

Also I check the window's dwStyle-property for having the bit
WS_VISIBLE set.

Now I have the strange case, that a window with the title 'Myapp' is
found (which is not(!) the 'Caption' of my main-window, but has
something to do with it. (In the Start-bar an entry with this
window-title also occurs and closing it, closes my application.) Even
if this window is not visible on the screen, it's WS_VISIBLE flag is
set.  

In my case, the result is, that my function did not work correctly,
because it seems that the hwnd-window is overlapped by the
'Myapp'-windowi, what is not the case, because this strange window is
not visible at all (and especially not at the rect-posiition  it seems
to).

So, is there perhaps another dwStyle-flag I can check?

Thanks, 

Michael
Technical Details
Message-ID: <b91bd2dnjukqfkdkpgtnths0nbltohne89@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a9182ef18c390728,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: <MR>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Is checking a window's dwStyle-value ' WS_VISIBLE' not sufficent to find out, if a window is currently visible on the screen?
Date: Sun, 06 Aug 2006 08:20:42 +0200
Message-ID: <b91bd2dnjukqfkdkpgtnths0nbltohne89@4ax.com>
X-Newsreader: Forte Free Agent 3.3/32.846
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 84.57.40.175
X-Trace: newsgroups.borland.com 1154845215 84.57.40.175 (5 Aug 2006 23:20:15 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsfeed0.kamp.net!newsfeed.kamp.net!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail