🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#3228
From: Bob Gonder
Date: Sun, 06 Aug 2006 13:43
36 lines
2448 bytes
<MR> wrote:

>To find out, if a certain window (hwnd) is overlapped by some other
>windows, my application 'MyApp' uses the api-function

You didn't say why you want to know this. If you just need to keep
your stuff visible, you might try the WS_EX_TOPMOST style.

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

IsWindowVisible()

>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.  

You might try using   IsIconic( hwnd)

>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?

Are you using VCL?
You might want to start your window search with Application->Handle ?

Again, it might be helpful to explain what you are trying to
accomplish, because this sounds like you are trying too hard to do
something simple.
Technical Details
Message-ID: <2rqbd296n1l0j9o06hftg57cc5ss1dfcki@4ax.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <b91bd2dnjukqfkdkpgtnths0nbltohne89@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a9182ef18c390728
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: 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 06:43:37 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <2rqbd296n1l0j9o06hftg57cc5ss1dfcki@4ax.com>
References: <b91bd2dnjukqfkdkpgtnths0nbltohne89@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 71.0.32.99
X-Trace: newsgroups.borland.com 1154871819 71.0.32.99 (6 Aug 2006 06:43:39 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail