IVsUIHierWinClipboardHelperEvents::OnPaste Method (Int32, UInt32)

 

Signals that a paste operation has occurred.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

int OnPaste(
	int fDataWasCut,
	unsigned int dwEffects
)

Parameters

fDataWasCut
Type: System::Int32

[in] If true, then the IDataObject has been successfully pasted into a target hierarchy. If false, then the cut or copy operation was cancelled.

dwEffects
Type: System::UInt32

[in] Visual effects associated with the drag and drop operation, such as cursors, bitmaps, and so on. These should be the same visual effects used in OnDropNotify.

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell.idl:

HRESULT IVsUIHierWinClipboardHelperEvents::OnPaste(
   [in] BOOL fDataWasCut,
   [in] DWORD dwEffects
);

When an object is pasted, the destination project handles the contents of the IDataObject, and then advises listening hierarchies that the paste occurred by calling Paste. At that time, the source hierarchy can cleanup from the paste. For example, on a cut, the item is removed from the source hierarchy.

Return to top
Show: