zerkms
zerkms

Reputation: 255025

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?

Upvotes: 1

Views: 347

Answers (2)

David Heffernan
David Heffernan

Reputation: 613382

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.

Upvotes: 1

zerkms
zerkms

Reputation: 255025

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).

Upvotes: 2

Related Questions