<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Bo Berglund via lazarus <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>> schrieb am Mo., 2. Nov. 2020, 08:07:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I thought that GetWindow(hWndTemp, GW_HWNDNEXT); would return the next<br>
larger handle following hWndTemp, but it seems like this is not the<br>
case. Is the result random or is there some known sequence when using<br>
the flag GW_HWNDNEXT??<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">The documentation about GW_HWNDNEXT on MSDN says this: </div><div dir="auto"><br></div><div dir="auto">=== MSDN begin ===</div><div dir="auto"><br></div><div dir="auto"><div dir="auto">The retrieved handle identifies the window below the specified window in the Z order.</div><div dir="auto">If the specified window is a topmost window, the handle identifies a topmost window. If the specified window is a top-level window, the handle identifies a top-level window. If the specified window is a child window, the handle identifies a sibling window.</div><div dir="auto"><br></div><div dir="auto">=== MSDN end ===</div><div dir="auto"><br></div><div dir="auto">So nowhere does it guarantee that the handles values themselves are ordered only that the resulting windows are ordered in some way. </div><div dir="auto"><br></div><div dir="auto">In general you should not rely on the order of Handle values, because from the perspective of the application they are to be considered as random.</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div></div></div>