Article View: borland.public.cppbuilder.nativeapi
Article #8589Re: IE is WindowActive or not?
From: nicolasr
Date: Thu, 07 Oct 2004 02:13
Date: Thu, 07 Oct 2004 02:13
27 lines
1697 bytes
1697 bytes
Hi,
as Remy wrote the string comparison does of course not work this way.
(It compares the pointer addresses instead of the strings)
I think I had something different in my test project...
Try this:
...
{
//not sure about the terminating null so allocate one more byte
char wClass[256];
GetClassName(GetActiveWindow(), wClass, 255);
AnsiString temp = wClass;
if(0 == temp.AnsiCompareIC("IEFrame"))
...
}
If you can assure that case is always the same you could
also use if(temp == "IEFrame").
Nick
> Thanks Nicolasr
> Not diference!
>
> Safari
>
Technical Details
Message-ID:
<4164a668$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4150d030@newsgroups.borland.com> <4150d293@newsgroups.borland.com> <41574660@newsgroups.borland.com> <415877c0$1@newsgroups.borland.com> <41648b12@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e705c536883f0885 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "nicolasr" <nicolasrNOSPAMATSIGNgmx.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <4150d030@newsgroups.borland.com> <4150d293@newsgroups.borland.com> <41574660@newsgroups.borland.com> <415877c0$1@newsgroups.borland.com> <41648b12@newsgroups.borland.com> Subject: Re: IE is WindowActive or not? Date: Thu, 7 Oct 2004 04:13:59 +0200 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 80.133.181.189 Message-ID: <4164a668$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1097115240 80.133.181.189 (6 Oct 2004 19:14:00 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail