HTMLTableEvents::oncopy Event

Fires on the source element when the user copies the object or selection, adding it to the system clipboard.

Syntax

VARIANT_BOOL oncopy(VOID);

Return Value

If the event bubbles and is cancellable, return VARIANT_TRUE to prevent the event from bubbling to other event handlers in the document tree. Return VARIANT_FALSE to allow bubbling.

Event DISPID

DISPID_HTMLELEMENTEVENTS_ONCOPY

The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.

Event Information

Bubbles Yes
Cancels Yes
To invoke
  • Right-click to display the shortcut menu and select Copy.
  • Or press CTRL+C.
Default action Duplicates the selection.

Remarks

Use the IHTMLDataTransfer::setData method to specify a data format for the selection.

See Also

About DHTML Data Transfer, HTMLTableEvents::onbeforecopy, HTMLTableEvents::onbeforecut, HTMLTableEvents::onbeforepaste, HTMLTableEvents::oncut, HTMLTableEvents::onpaste, IHTMLDataTransfer::setData