Hi.

I want to get the windowhandle from any window (other programms), what having the keyboard focus. No Problem with GetActiveWindow or GetForegroundWindow. But how can I get the handle from any CHILDWINDOW, that have the keyboard focus? Without using the mousecursor position, so as for ChildWindowFromPoint...
Posted on 2006-10-15 15:17:43 by Nordwind64
I think the child window with focus will appear as the highest z-order child window during an EnumChildWindows callback, you can simply enumerate the child windows, the first one should be the window with focus.
Posted on 2006-10-15 16:41:28 by donkey
>I think the child window with focus will appear as the highest z-order child window during an EnumChildWindows callback, you can simply enumerate the child windows, the first one should be the window with focus.

??
For example, 1-st child may be disabled static :-)

What about standard GetCurrentThreadId + GetForegroundWindow + GetWindowThreadProcessId + AttachThreadInput + GetFocus ?

For example - http://www.geocities.com/xmemor/2lz/wintreesnap.zip
Posted on 2006-10-15 20:11:50 by kero
You can either use the "FindWindowEx" Win32 API to retrieve the handle of child windows or simply use the "GetWindow" with the GW_HWNDNEXT flag to navigate through child windows in a window.
Posted on 2006-10-16 07:48:31 by XCHG
Hi to all!

What about standard GetCurrentThreadId + GetForegroundWindow + GetWindowThreadProcessId + AttachThreadInput + GetFocus ?


Thank you, kero! Works fine.  :D
Posted on 2006-10-16 09:46:13 by Nordwind64