Reputation: 565
Is there any way for a Windows application to get notified when another application reads from the clipboard? I would like to emphasize -- not when the clipboard content changes, but when any another application reads it.
Upvotes: 1
Views: 370
Reputation: 15817
Use Delayed Rendering. You'll receive a WM_RenderFormat when an application pastes the data into itself. (Update: But you don't know if any OTHER apps have pasted that same data. Once WM_RenderFormat has been satisfied, there are no further notifications if other apps paste that same data, using the same format. e.g. CF_TEXT).
Of course, this applies to ANY application, so you'll be notified when clipboard mangers, virtual machines, remote desktop, etc., sync the clipboard between workspaces.
Update: After clarification from the OP that he needs to know about clipboard reads when his app is neither the provider or consumer, then the answer for that situation is NO. It is not possible for a "neutral 3rd-party observer app" to know which specific apps have pasted data.
Upvotes: 1