如何使剪贴板清空 ( 积分: 20 )

  • 主题发起人 主题发起人 我要学
  • 开始时间 开始时间

我要学

Unregistered / Unconfirmed
GUEST, unregistred user!
不要使用<br>clipboard.clear;<br>因为这样要引用 &nbsp;USES clipboard. 程序会增加三百K左右<br><br>用API 行吗?或其它方法
 
不要使用<br>clipboard.clear;<br>因为这样要引用 &nbsp;USES clipboard. 程序会增加三百K左右<br><br>用API 行吗?或其它方法
 
1、看clear里面做了什么,把代码复制过来<br>2、自己监控剪贴版,好象有个函数SetClipboardData,EmptyClipboard ,这两个函数都需要先OpenClipboard,具体看MSDN<br><br>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard.asp<br><br>The EmptyClipboard function empties the clipboard and frees handles to data in the clipboard. The function then assigns ownership of the clipboard to the window that currently has the clipboard open. <br><br>Syntax<br><br>BOOL EmptyClipboard( &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VOID <br>);<br>Parameters<br><br>This function has no parameters.<br>Return Value<br><br>If the function succeeds, the return value is nonzero.<br><br>If the function fails, the return value is zero. To get extended error information, call GetLastError. <br><br><br><br><br>Remarks<br><br>Before calling EmptyClipboard, an application must open the clipboard by using the OpenClipboard function. If the application specifies a NULL window handle when opening the clipboard, EmptyClipboard succeeds but sets the clipboard owner to NULL. Note that this causes SetClipboardData to fail. <br><br>For an example, see Copying Information to the Clipboard.<br><br>Function Information<br><br>Minimum DLL Version user32.dll <br>Header Declared in Winuser.h, include Windows.h <br>Import library User32.lib <br>Minimum operating systems Windows 95, Windows NT 3.1 <br><br>See Also<br><br>Clipboard, OpenClipboard, SetClipboardData, WM_DESTROYCLIPBOARD<br><br>兄弟,你这20分真超值啊
 
哈,我没代码给你,我只是随随便便问一下,因为以后可能用得到.<br><br>谢了.<br><br>没看,先给分
 

Similar threads

D
回复
0
查看
812
DelphiTeacher的专栏
D
D
回复
0
查看
758
DelphiTeacher的专栏
D
D
回复
0
查看
708
DelphiTeacher的专栏
D
I
回复
0
查看
716
import
I
后退
顶部