Get Window Zorder?
-
Hi, all :) How can I get a window’s current view placement order (also called “Zorder”)? And is it possible to enumerate from the absolute top window to the last? So that the first window you get has the highest Zorder. Aidman » over and out
I think that is going to depend on exactly WHERE you want to enumerate from and what type on windows you are trying to enumerate. Being that i'm not sure what you mean here is my best guess. I would use ::GetWindow( ::GetDesktopWindow(), GW_HWNDFIRST ); after that it looks like you can just sit in a loop. This is not recommended though according to the docs. I'm not sure of the exact zorder impact ( ordering ) but the other thing to try would be to give EnumChildWindows a shot. Well good luck. Joseph Dempsey joseph_r_dempsey@yahoo.com "Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning." --anonymous
-
I think that is going to depend on exactly WHERE you want to enumerate from and what type on windows you are trying to enumerate. Being that i'm not sure what you mean here is my best guess. I would use ::GetWindow( ::GetDesktopWindow(), GW_HWNDFIRST ); after that it looks like you can just sit in a loop. This is not recommended though according to the docs. I'm not sure of the exact zorder impact ( ordering ) but the other thing to try would be to give EnumChildWindows a shot. Well good luck. Joseph Dempsey joseph_r_dempsey@yahoo.com "Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning." --anonymous
-
According to the documentation calling GetWindow in a loop is unsafe because it could get you into a infinite loop. This probably has to do with the zorder changing on windows that you are enumerating. EnumChildWindows takes this into account and protects against it happening. Joseph Dempsey joseph_r_dempsey@yahoo.com "Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning." --anonymous
-
Hi, all :) How can I get a window’s current view placement order (also called “Zorder”)? And is it possible to enumerate from the absolute top window to the last? So that the first window you get has the highest Zorder. Aidman » over and out
See if GetTopWindow() will get you started.
-
Hi, all :) How can I get a window’s current view placement order (also called “Zorder”)? And is it possible to enumerate from the absolute top window to the last? So that the first window you get has the highest Zorder. Aidman » over and out
"Utility to display information on all windows in z-order and their children." http://www.codeproject.com/useritems/WINDUMP.asp[^] may be helpfull. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
-
"Utility to display information on all windows in z-order and their children." http://www.codeproject.com/useritems/WINDUMP.asp[^] may be helpfull. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com