COPY_FROM_CLIPBOARD@

Platform

Win32, x64

Purpose

To copy data from the clipboard.

Syntax

INTEGER FUNCTION COPY_FROM_CLIPBOARD@( BUFFER, NUM, TYPE )
CHARACTER(*)  BUFFER
INTEGER NUM, TYPE

Description

Use this routine to copy anything from the clipboard. The following data types can exist in the clipboard, though not all are directly supported by ClearWin+:

 

CF_BITMAP

Bitmap data

 

CF_DIB

A BITMAPINFO structure followed by a bitmap

 

CF_DIF

Data interchange format

 

CF_DSPBITMAP

Private data stored in a bitmap format

 

CF_DSPMETAFILEPICT

Private data stored in metafile format

 

CF_DSPTEXT

Private data stored in text format

 

CF_METAFILEPICT

The data is in metafile format

 

CF_OEMTEXT

The data is in OEM text format

 

CF_OWNERDISPLAY

The data is a private format

 

CF_PALETTE

A palette

 

CF_RIFF

Resource interchange format

 

CF_SYLK

Microsoft symbolic link format

 

CF_TEXT

Text format

 

CF_TIFF

Tag image file format

 

CF_WAVE

Wave format


 

The BUFFER will contain NUM bytes copied from the clipboard. To determine the length of CF_TEXT or CF_OEMTEXT the routine SIZEOF_CLIPBOARD_TEXT@ can be called. On 64-bit systems more than 2GB of data canvas can be copied from the clipboard using COPY_FROM_CLIPBOARD64@.

Return value

Returns 1 for success or zero for failure.

See also

COPY_TO_CLIPBOARD@,
COPY_TO_CLIPBOARD64@,
COPY_FROM_CLIPBOARD64@,
CLIPBOARD_TO_SCREEN_BLOCK@,
GRAPHICS_TO_CLIPBOARD@,
SIZEOF_CLIPBOARD_TEXT@,
SIZEOF_CLIPBOARD_TEXT64@

Example

INTEGER addr,len,i
CHARACTER buffer*1024
len=sizeof_clipboard_text@()
IF(len.GT.0)THEN
  CALL get_storage@(addr,len)
  IF(addr.GT.0)THEN
    i=copy_from_clipboard@(addr,len, CF_TEXT)
    CALL move@(buffer,CCORE1(addr),len)
  ENDIF
ENDIF


 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited