I need to process the contents of the clipboard in the background application.
How can I do this?
I need an event that will be called each time when the clipboard is changed. It does not matter from which the application is copying.
I know the function for reading and writing, such as GetClipboardData()
and SetClipboardData()
.
Got any ideas how to do this in C++?
Thanks in advance!
Take a look at Monitoring Clipboard Contents:
Adding a Window to the Clipboard Viewer Chain:
Processing the WM_CHANGECBCHAIN Message:
Since Windows Vista, the right method is to use clipboard format listeners:
See Monitoring Clipboard Contents: