Say I have a handle to a window ("my" window). I would like to know if there are any other windows "on top" of it.

I think I can use EnumWindows and then GetWindowRect on each window and see if any overlap my window. If so, use WindowFromPoint to find out who is on top.

But this seems like a lot of work! Does anyone know an easier method?

Also, I think I remember seeing a Windows function to determine overlap (if any) of two windows, but I can't find it now. Is there such a function, or have I made that up? (I know I can do a mess of subtraction, but...)