Can any one tell me how to get to the selected text in an edit/richedit control (or any control having text that could be highlighted) of a foreground window from my own application? What about accessing a selected text in IE browser? One can see such use in Microsoft Boolshelf -- highlight any word in any window and then click on the QuickShelf icon in the system tray to get the meaning of the word! Tomasz Sowinski in the VC++ message board mentioned earlier using a combination of (1) calling the WIN32 API GETFOREGROUNDWINDOW to get a handle to the window and (2) sending the EM_GETSEL window message to get a pointer to the selected text. But I am not sure if this limits only to the case when the foreground window is itself a edit/richedit control. Would appreciate very much any answers to these questions! Gene Yu - gene4yu@yahoo.com
Gene Yu
Posts
-
accessing selected text in a fore ground window -
accessing selected text in a foreground windowCan any one tell me how to get to the selected text in an edit/richedit control (or any control having text that could be highlighted) of a foreground window from my own application? What about accessing a selected text in IE browser? One can see such use in Microsoft Boolshelf -- highlight any word in any window and then click on the QuickShelf icon in the system tray to get the meaning of the word! Tomasz Sowinski in the VC++ message board mentioned earlier using a combination of (1) calling the WIN32 API GETFOREGROUNDWINDOW to get a handle to the window and (2) sending the EM_GETSEL window message to get a pointer to the selected text. But this limits only the case when the foreground window is itself a edit/richedit control. Would appreciate very much any answers to these questions! Gene Yu - gene4yu@yahoo.com
-
Getting selected text globallyGlad to see your response. I have been looking for an answer to a similar question for a while! Can you tell me how to get to the selected text if the foreground window is not itself a edit control or richedit control but contains such controls? What about accessing a selected text in IE browser? Would appreciate very much your answers to these questions! Gene Yu - gene4yu@yahoo.com