Topmost visible window of a screen point

  • Thread starter Thread starter pigeonrandle
  • Start date Start date
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.
 
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
 
Back
Top