The
WM_PASTE
message is an application internal message. It might be send for example to the active control window when choosing the Paste option from the Edit menu of an application, the context menu of a control window, or upon the Ctrl-V / Shift-Ins accelerators.
Besides a few execpetions, messages are handled on application level. They are send to a specific window which might forward them to the parent window or child windows. But such application level messages are not forwarded to windows of other applications.
Your code example is catching the message in
your application. That is not called when pasting in any
other application.
It has been all said at your previous question
How to capture the paste event in windows?[
^]:
There is no general and reliable method to catch paste events outside your application.