I require a function to enable me to retrieve the handle and preferably class and text from the infocus edit control in another application.
Perhaps if I explain what my app does it may help :
1) User launches app.
2) User chooses a hot key combination and minimizes my app.
3) User opens another app like notepad, wordpad etc.
4) User starts to edit text and then hits the hotkey
5) My app picks up the hwnd of the currently in focus control so that I can get at the text.
Now 5 is where I'm having the trouble.
I know how to get the hwnd of the currenly active window the user is in.
I know how to work out what class the control is if I have the hwnd of the control (i.e. infocus edit control)
I know how to retrieve the hwnd of a control if the mouse pointer (cursor) is over it.
But I cant figure out how to retrieve the infocus edit controls hwnd without sticking the mouse pointer over it first, which of course is not very good.
1) Complete and fully-functional example of use including function (source only is fine)
2) Installation package not required.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc.)
Windows 95, 98, ME, NT4, 2k, XP