Topmost visible window of a screen point

P

pigeonrandle

Hi,
I am building an application that is similar to spy++. I want the user
to be able to click on a 'window' (textbox/combo/etc) and have it
highlighted.

BUT... the window they click on may share common coordinates with
another window, so how do i find the topmost visible window, given a
toplevel window handle and some x and y coordinates?


Cheers in advance,
James.
 
S

Stoitcho Goutsev \(100\)

pigeonrandle,

There are bunch of API methods that can be used for that:

WindowFromPoint
ChildWindowFromPoint
ChildWindowFromPointEx
RealChildWindowFromPoint

BTW there is only one window that contains a given point and this is the
window on top according to the z order
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top