2、使用WM_DrawClipboard消息可以搞定
但存在问题:
Win32文档中说明如下:
The WM_DRAWCLIPBOARD message is sent to the first window in the
clipboard viewer chain when the content of the clipboard changes.
This enables a clipboard viewer window to display the new content of
the clipboard.
即消息只直接发给clipboard viewer链中的第一个程序,其他程序不会直接收到消息
后面又有说明如下:
Only clipboard viewer windows receive this message. These are windows
that have been added to the clipboard viewer chain by using the
SetClipboardViewer function.
Each window that receives the WM_DRAWCLIPBOARD message must call the
SendMessage function to pass the message on to the next window in the
clipboard viewer chain. The handle of the next window in the chain is
returned by SetClipboardViewer, and may change in response to a
WM_CHANGECBCHAIN message.
即:
(1)使用SetClipboardViewer函数将本程序设置为Clipboard Viewer
(2)Clipboard Viewer链中下一个程序的Handle由上述函数返回
(3)本程序在处理完WM_DrawClipboard消息后必须将WM_DrawClipboard消息发送给
下一个程序,否则链中所有后续程序都不会收到消息。己所不欲。。。。
没什么技术问题了,程序就不写了