HI to all!
I would like to share my concerns with you and hear what you have to say about it!
I've build an a application which runs on startup and is located in system tray. One of it's jobs is to get the selected text when user select it from various programs (like MS Word, Excel,..Notepad,Web browser and so)!
The user select text and triggers my app using hot-key mechanism, which than needs to get that text.
Here is my observation:
First I need to obtain hWnd from where the user called my app, than search that window for selected text! I read documentation on accessibility on MSDN, but I come to conclusion how I don't need 'WinEvent's' because I need only to get text when user needs it from my app, so monitoring events is not the way (at least that's my opinion ).
So the most importing thing is to get hWnd!
I also read on MSDN site about UI Automation and text pattern but not detailed, if anyone knows more about this and how to achieve this please let me know!
Is there a way to 'tell' a program to perform a copy to clipboard (ctrl+C) action. So if there is a text with selection mark it will be placed on clipboard and from there everything is easy from me!
Please let me know your's opinion.
P.S.
Excuse me for my poor English!
I'm working on VC++ , XP sp2!
Thanks to all!