How to get child window of external parent window that cursor is over?

This image that I made more or less illustrates my problem. Any ideas?

http://i32.tinypic.com/30uecuv.jpg
GetFocus?

http://msdn.microsoft.com/en-us/library/ms646294(VS.85).aspx

 
HWND window_that_has_focus = GetFocus();
GetFocus gets the focused window, I want the focused child window of a given window.
Based on my understanding of your question in the image you linked to, what you want is to obtain a handle to the edit control. If that is so, it's very easy...

hCtlWnd=GetDlgItem(hwnd, ID_EDITCONTROL);

You now have a HWND handle to your edit control.
Last edited on
I don't know the ID of the Dialog Item; it's not a window created by me. I want the child window created by an external window.
>If that is so, it's very easy...
> hCtlWnd=GetDlgItem(hwnd, ID_EDITCONTROL);


No, it has nothing to do with Edit controls
It's a Web page and a Web page use Elements and are accessible by COM.
Last edited on
So, any ideas?

I have a handle on the window of the browser, how can I find a child window within it (given that I have the text of the child window)? I've tried EnumChildWindow(), but that only enumerates the child windows of the parent windows, and doesn't deal with child windows of child windows.
Topic archived. No new replies allowed.