Sign in Join
FPDoc Onlineexperiment

TClipboard.AddFormat function

Member of TClipboardpublicIn unit Clipbrd

Acquires ownership of the Clipboard and adds a format.

Declaration

pascal
function AddFormat(FormatID: TClipboardFormat; Stream: TStream)
: Boolean
function AddFormat(FormatID: TClipboardFormat; var Buffer; 
 Size: Integer): Boolean

Arguments

FormatID

Clipboard format identifier (TClipboardFormat) updated in the method.

Stream

TStream instance with the content for the specified clipboard format.

Buffer

Untyped, updatable buffer with the content stored for the clipboard format.

Size

Number of bytes in Buffer stored in the method.

Function result

True if format added correctly.

Description

If not already done, this function acquires ownership of the clipboard. Acquiring ownership clears the clipboard. If the format already exists, it replaces the old content. Otherwise, it is added. The format CF_TEXT is handled by the private AsText and SetTextBuf.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.