🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#3246
From: Remy Lebeau (TeamB)
Date: Mon, 07 Aug 2006 18:14
33 lines
2321 bytes
<MR> wrote in message news:b91bd2dnjukqfkdkpgtnths0nbltohne89@4ax.com...

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

Sounds like you found the main TApplication window for your executable.
TForm is NOT the top-most main window of a VCL program.  TApplication is.
TApplication has a 0x0 pixel visible window.  That window controls the main
taskbar button for the program, amongst other things.

> In my case, the result is, that my function did not work correctly,

While searching for windows, you should be taking their class names into
account, so that you can skip past undesirable windows such as
TApplication's.

> because it seems that the hwnd-window is overlapped by the
> 'Myapp'-windowi, what is not the case

Actually, it could very well be the case.  The TApplication window is simply
too small to see with the human eye, but the computer still knows about it
and treats it like any other window.

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

No.


Gambit
Technical Details
Message-ID: <44d7836a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!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: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <b91bd2dnjukqfkdkpgtnths0nbltohne89@4ax.com>
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: Mon, 7 Aug 2006 11:14:41 -0700
Lines: 35
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <44d7836a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1154974570 68.69.17.41 (7 Aug 2006 11:16:10 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news2.google.com!newsfeed.gamma.ru!Gamma.RU!newsfeed.freenet.de!news.albasani.net!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail