Z-axis window value
I can retrieve the position of window using GetWindowRect
winapi function.
It should be a function also that defines the order of windows in z-axis (which window is above and which is under), but cannot find the appropriate function.
Point me to any one?
Well, seems like EnumDesktopWindows
returns windows in the Z order from the top to the bottom. So no need in any special function then (which doesn't exist perhaps).
You don't get the z order directly. You are expected to call GetWindow()
passing GW_HWNDNEXT
or GW_HWNDPREV
to walk the z order hierarchy.
Start at one of your windows and walk until you find either the other window or your walk terminates. This then tells you the relationship between the two windows.
精彩评论