Is there an alternative to WM_DRAWCLIPBOARD for catching Cut,Copy and Paste ?
Hi dear forum,
Is there an alternative to SetClipboardViewer , subclassing the wiondow and then intercepting the WM_DRAWCLIPBOARD msg ?
Is there a way by using the OLE clipboard instead of the Legacy clipboard ?
Regards.
Re: Is there an alternative to WM_DRAWCLIPBOARD for catching Cut,Copy and Paste ?
Re: Is there an alternative to WM_DRAWCLIPBOARD for catching Cut,Copy and Paste ?
Quote:
Originally Posted by
Eduardo-
Thanks Eduardo.
Unfortunately, using AddClipboardFormatListener and then monitoring the WM_CLIPBOARDUPDATE message is next to useless as it doesn't differenciate between Copying, cutting or pasting data.
Also, the message cannot be intercepted in order to abort\prevent the clipboard operation.
Regards.
Re: Is there an alternative to WM_DRAWCLIPBOARD for catching Cut,Copy and Paste ?
I saw that there are three methods listed there:
Quote:
There are three ways of monitoring changes to the clipboard. The oldest method is to create a clipboard viewer window. Windows 2000 added the ability to query the clipboard sequence number, and Windows Vista added support for clipboard format listeners.
I didn't test anyone, but all three are useless?
Re: Is there an alternative to WM_DRAWCLIPBOARD for catching Cut,Copy and Paste ?
Quote:
Originally Posted by
JAAFAR
Thanks Eduardo.
Unfortunately, using AddClipboardFormatListener and then monitoring the WM_CLIPBOARDUPDATE message is next to useless as it doesn't differenciate between Copying, cutting or pasting data.
Also, the message cannot be intercepted in order to abort\prevent the clipboard operation.
Regards.
I'm not that familiar with using the OLE clipboard, but are you saying that it can differentiate between copy, paste, & cutting, and preventing applications from accessing it?
FYI: The OLE clipboard uses an IDataObject interface.
Re: Is there an alternative to WM_DRAWCLIPBOARD for catching Cut,Copy and Paste ?
Quote:
Originally Posted by
LaVolpe
I'm not that familiar with using the OLE clipboard, but are you saying that it can differentiate between copy, paste, & cutting, and preventing applications from accessing it?
FYI: The OLE clipboard uses an IDataObject interface.
Hi,
No. I am not saying it can or it can't as I don't even know how to use the oleclipboard... I just thought I would post this question in the forum in case anyone knows.
The only thing I know is clearing the clipboard by passing a 0 instead of a pointer to the IDataObject::blush:
Code:
Declare Function OleSetClipboard Lib "OLE32.DLL" _
(ByVal theDataObject As Long) As Integer
Sub Test()
OleSetClipboard (0)
End Sub
Thanks.