Hi,
I have this question which gives me nightmares these days. I need to make an application which can get the highlighted text in any window. Ex: When I run my app, and when I dbl click any word in notepad(say), the highlighted word should be available to my app.
I am talking in Win32 of course. There is one way that I found out. It uses a mouse hook, and on a dbl-click event, send a WM_COPY command to the foreground window, and then get the clipboard contents. I haven't tried this yet, but guess it'll work. But, can anyone tell me a more general way to get selected text from a window? Thanks.
I have this question which gives me nightmares these days. I need to make an application which can get the highlighted text in any window. Ex: When I run my app, and when I dbl click any word in notepad(say), the highlighted word should be available to my app.
I am talking in Win32 of course. There is one way that I found out. It uses a mouse hook, and on a dbl-click event, send a WM_COPY command to the foreground window, and then get the clipboard contents. I haven't tried this yet, but guess it'll work. But, can anyone tell me a more general way to get selected text from a window? Thanks.
Comment