Is there any windows application process interface to read selected/highlighted text from foreground window .
The accessibility interfaces are provided for this purpose. There have been various such interfaces in the history of Windows. Today, the recommended API is UI Automation. An overview can be found on MSDN: Windows Automation API Overview.
Be prepared for the fact that not all controls in every application will submit to automation. In general it is probably impossible to expect to read text from every application in existence. However, well behaved applications will support automation.
1.4m articles
1.4m replys
5 comments
57.0k users