I know that you can get the text selection by sending a WM_COPY message and then reading the new contents of the clipboard.
But how does Windows retrieve the text selection in the first place before it gets stored in the clipboard? I mean there has to be a way to get the text without sending it to the clipboard, right?
But all I could find online were workarounds that write to the clipboard and then quickly restore the old contents.. That's not what I'm looking for, though.
(This question is not about a specific programming language.)