🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
13 messages
13 total messages Started by JD Thu, 18 Oct 2007 17:04
Given X,Y Find a Window
#1157
Author: JD
Date: Thu, 18 Oct 2007 17:04
5 lines
947 bytes
If I have a given X,Y, can I detect if another Window resides
there?

~ JD
Re: Given X,Y Find a Window
#1159
Author: Alan Bellingham
Date: Thu, 18 Oct 2007 17:09
11 lines
1282 bytes
"JD" <nospam@nospam.com> wrote:

>If I have a given X,Y, can I detect if another Window resides
>there?

You mean, you want a function like WindowFromPoint()?

Alan Bellingham
-- 
Team Browns
ACCU Conference 2008: 2-5 April 2008 - Oxford (probably), UK
Re: Given X,Y Find a Window
#1160
Author: JD
Date: Thu, 18 Oct 2007 17:16
11 lines
1163 bytes
Alan Bellingham <alan@lspace.org> wrote:
>
> You mean, you want a function like WindowFromPoint()?

Correct.

Now that you phrased it that way, i know how to do it but
I'm still hoping that there's an API that simplifies.

~ JD
Re: Given X,Y Find a Window
#1161
Author: Alan Bellingham
Date: Thu, 18 Oct 2007 17:30
16 lines
1541 bytes
"JD" <nospam@nospam.com> wrote:

>> You mean, you want a function like WindowFromPoint()?
>
>Correct.
>
>Now that you phrased it that way, i know how to do it but
>I'm still hoping that there's an API that simplifies.

Hmm, I'm not sure how much simplification could be applied to a function
that takes a POINT and returns an HWND.

Alan Bellingham
-- 
Team Browns
ACCU Conference 2008: 2-5 April 2008 - Oxford (probably), UK
Re: Given X,Y Find a Window
#1162
Author: Ed Mulroy [TeamB]
Date: Thu, 18 Oct 2007 17:37
27 lines
1610 bytes
What do you mean by "simplifies"?  WindowFromPoint is pretty simple.

If your problem is that you don't want to use the POINT struture then use 
something like this:

-------------------
#include <windows.h>

HWND WindowFromPoint(long x, long y)
    {
    POINT p = { x, y };

    return ::WindowFromPoint(p);
    }
-------------------

.  Ed

> JD wrote in message
> news:471794e1$1@newsgroups.borland.com...
>
>> You mean, you want a function like WindowFromPoint()?
>
> Correct.
>
> Now that you phrased it that way, i know how to do it but
> I'm still hoping that there's an API that simplifies.
Re: Given X,Y Find a Window
#1167
Author: Remy Lebeau (TeamB)
Date: Thu, 18 Oct 2007 18:17
11 lines
1204 bytes
"JD" <nospam@nospam.com> wrote in message 
news:47179239$1@newsgroups.borland.com...

> If I have a given X,Y, can I detect if another
> Window resides there?

Look at WindowFromPoint()


Gambit 
Re: Given X,Y Find a Window
#1181
Author: Regis St-Gelais
Date: Fri, 19 Oct 2007 12:00
14 lines
1504 bytes
"JD" <nospam@nospam.com> a �crit dans le message de news: 
471794e1$1@newsgroups.borland.com...
>
>
> Now that you phrased it that way, i know how to do it but
> I'm still hoping that there's an API that simplifies.
>

WindowFromPoint() is a windows API:
http://msdn2.microsoft.com/en-us/library/ms633558.aspx

-- 
Regis St-Gelais
www.laubrass.com
Re: Given X,Y Find a Window
#1187
Author: JD
Date: Sat, 20 Oct 2007 06:36
10 lines
1100 bytes
"Regis St-Gelais" <regis.st-gelais@NOSPAMlaubrass.com> wrote:
>
> WindowFromPoint() is a windows API:

LOL! I figured that from the other replies!

Thanks!

~ JD
Re: Given X,Y Find a Window
#1186
Author: JD
Date: Sat, 20 Oct 2007 06:36
12 lines
1272 bytes
Alan Bellingham <alan@lspace.org> wrote:
>
> Hmm, I'm not sure how much simplification could be applied
> to a function that takes a POINT and returns an HWND.

LOL! I feel sooo stupid! I didn't get that you were talking
about an existing API. Missed that completely!

Thanks!

~ JD
Re: Given X,Y Find a Window
#1188
Author: JD
Date: Sat, 20 Oct 2007 06:36
16 lines
1250 bytes
"Ed Mulroy [TeamB]" <dont_email_me@bitbuc.ket> wrote:
>
> What do you mean by "simplifies"?  WindowFromPoint is pretty
> simple.

LOL!

I didn't realize that Alan had noted an existing API. I was
thinking that I have to code something using EnumWindows.

> If your problem is that you don't want to [...]

My problem was I misunderstood Alan completely <g>.

~ JD
Re: Given X,Y Find a Window
#1189
Author: JD
Date: Sat, 20 Oct 2007 06:37
10 lines
983 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
> Look at WindowFromPoint()

Now that I understand! <g>

Thanks!

~ JD
Re: Given X,Y Find a Window
#1190
Author: Asger Jørgensen
Date: Sat, 20 Oct 2007 08:05
7 lines
1160 bytes
Hi JD

You seem to have a lot of fun today ;-)

Happy regards
Asger
Re: Given X,Y Find a Window
#1191
Author: JD
Date: Sat, 20 Oct 2007 08:21
8 lines
1159 bytes
=?utf-8?Q?Asger_J=C3=B8rgensen?= <junk@Asger-P.dk> wrote:
>
> You seem to have a lot of fun today ;-)

What else can you do but laugh when you do something stupid?

~ JD
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads