Getting handle on edit control of selected window

1
2
3
4
5
6
7
8
9
HWND spamWindow = GetFocus();
    

        if(spamWindow == NULL)
                return FALSE;

        //Get the handle of the Notepad window's edit control.
        HWND edit = FindWindowEx( spamWindow, NULL, _T( "Edit" ), NULL );
//FindWindowEx, in that function you must insert something like "notepad" //but I want to put in my handle from GetFocus()  



See the problem? FindWindowEx only allow's windows names to be inserted in the parameter. If there is any way for me to be able to get a handle of the edit control of the selected window(as defined by GetFocus()), I'd love to know it.
Last edited on
Topic archived. No new replies allowed.