Reliable way to get window underneath mine?

Giganews Newsgroups
Subject: Reliable way to get window underneath mine?
Posted by:  Somebody (somebo…@cox.net)
Date: Sun, 16 Mar 2008

What is a reliable way to get the window underneath mine?

Say that my window is "Window A"... "Window A" is being dragged around the
screen by its title bar. The mouse cursor is at x,y. I need to know if I can
drop it on the window thats at x,y (not counting "Window A"). So I need to
get this window handle somehow. WindowFromPoint() obviously gets "Window A".
I'd rather not enumerate all the windows since that seems like a performance
issue. Thanks.

Replies