Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Win32 (http://www.go4expert.com/forums/win32/)
-   -   Win32 to Copy User-Selected Text (http://www.go4expert.com/forums/win32-copy-user-selected-text-t22243/)

Eidetikos 29May2010 04:22

Win32 to Copy User-Selected Text
 
I've been struggling for a while now with retrieving the highlighted/selected text from a window. I've used:

GetForegroundWindow
GetCursorPos
WindowFromPoint
SendMessage(... GETTEXT...)/SendMessage(...GETSELTEXT...)

But the best I can do is on some windows get back the entire text. In Word, IE, Firefox, etc. I get nothing back. I'm using C# to make the API calls but if anyone knows how to do it in any language, I would appreciate it.

Mike911 7Jun2010 10:39

Re: Win32 to Copy User-Selected Text
 
I dont use other window than mine.
You have to use THEIR dll´s.

Mike911 7Jun2010 10:42

Re: Win32 to Copy User-Selected Text
 
I mean: I dont use foreign windows and their content.
You have to include the DLLs for eg. IE or Firefox.
Then you can retrieve a handler to that window and read the context.


All times are GMT +5.5. The time now is 20:25.