2.1.25.12 GetClipboardText


Description

Get the text data copied onto the clipboard.

Syntax

BOOL GetClipboardText( string & strData )

Parameters

strData
[output] text copied from clipboard

Return

Returns TRUE and a string containing text copied onto the clipboard

on success or returns FALSE and an empty string on failure or if

the Clipboard is empty.

Examples

EX1

int GetClipboardText_ex1()
{
    string strClipboardText;
    BOOL bSuccess;
    bSuccess = GetClipboardText( strClipboardText );
    if( bSuccess )
        out_str( strClipboardText );
    else
        out_str( "Error reading Clipboard or Clipboard is empty." );
        return 0;
}

Remark

See Also

GetClipboardData

Header to Include

origin.h

Reference