您现在的位置: 主页 > 上位机技术 > delphi > WM_DRAWCLIPBOARD 监视剪切板
本文所属标签:
为本文创立个标签吧:

WM_DRAWCLIPBOARD 监视剪切板

来源: 网络用户发布,如有版权联系网管删除 2020-04-04 

WM_DRAWCLIPBOARD 监视剪切板 第一步:Add the window to the clipboard viewer chain.

通过SetClipboardViewer()传入窗口句柄,所有监视剪贴板的窗口句柄会组成一个链表(后来者靠前)。这样当剪贴板内容发生变化时,Windows系统给给这些窗口发生消息。



第二步:Process the WM_CHANGECBCHAIN message.

当这个监视剪贴板的窗口句柄链表发生变化时,会收到这个消息。每个窗口都应该给下一个窗口传递消息。

这个消息的wParam和lParam说明如下:

wParam表示

A handle to the window being removedfrom the clipboard viewer chain

lParam表示

A handle to the next window in thechain following the window being removed. This parameter is NULL if thewindow being removed is the last window in the chain。



第三步:Process the WM_DRAWCLIPBOARD message.

当剪贴板数据发送变化时,窗口会依次收到这个消息。



第四步:Remove the window from the clipboard viewer chain before itis destroyed.

当窗口关闭时,应该调用ChangeClipboardChain()来通知Windows系统将自己从监视剪贴板的窗口句柄链表中移除。




              查看评论 回复



嵌入式交流网主页 > 上位机技术 > delphi > WM_DRAWCLIPBOARD 监视剪切板
 

"WM_DRAWCLIPBOARD 监视剪切板"的相关文章

网站地图

围观()