1

I'd like to be able to track text selections across any application -- is there a hook to enable this behavior on Win32?

Bonus: Anyone gurus know the equivalent hooks for OS X & Linux?

tunack
  • 13
  • 4
  • Without more information, my first try would be to use the Accessibility APIs. http://msdn.microsoft.com/en-us/library/dd373592%28v=VS.85%29.aspx – Mattias S Aug 20 '10 at 11:23

1 Answers1

0

SetWindowsHookEx will do the trick.

http://msdn.microsoft.com/en-us/library/ms644990(v=vs.85).aspx

  • Could you elaborate a bit? - I don't see a "Text selection" hook in SetWindowsHookEx... – Nils Aug 01 '11 at 09:41
  • you can intercept any mouse gesture or keyboard event at a low-level. when you consider that a mouse selection is a left-button-down-mouse-drag for a particular window, its pretty easy to look for such events on given windows or mouse classes. windows hooks is just a means to an end, so as you say, you wont find any "text selection" in the doco. –  Aug 02 '11 at 08:27