🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

WindowState

#6044
From: JD
Date: Mon, 13 Jun 2005 01:32
26 lines
1764 bytes
AFAIK, it's impossible to confirm a window's state unless (and
only if) it's ExStyle includes the WS_APPWINDOW flag.

My tests show that excluding WS_APPWINDOW (BCB default) from
the window's ExStyle causes unreliable results from API calls
that allow you to determine the window state. For example,
IsIconic() may or may not return the correct bool.

How the API's errors is that without the WS_APPWINDOW flag
applied to the window's ExStyle, IsIconic always returns false.
More specifically, windows records the state at what ever the
last known state was prior to minimizing. For example, if the
state was wsMaximized prior to minimizing, the state would be
reported as wsMaximized even though it was actually wsMinimized.

That said, I believe that there must be a way to know the
correct window state, regardless of the ExStyle, because I
have seen programs behave as if they must have known.

My goal is to be able to correctly identify the window state at
any given moment.

Any takers?

~ JD
Technical Details
Message-ID: <42ace21e$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.inode.at!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4e7735b974fe9667,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JD" <nospam@nospam.com>
Sender: "JD" <nospam@nospam.com>
Reply-To: "JD" <nospam@nospam.com>
Subject: WindowState
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 205.188.116.135     
X-Forwarded-For: 172.147.146.177
NNTP-Posting-Host: 207.105.83.66
Message-ID: <42ace21e$1@newsgroups.borland.com>
Date: 12 Jun 2005 18:32:14 -0700
X-Trace: newsgroups.borland.com 1118626334 207.105.83.66 (12 Jun 2005 18:32:14 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.inode.at!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail